Guide · Agent skill
How to use the Django S3 File Storage agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The django-storages-s3 skill is a set of instructions that teaches an AI coding agent to configure a Django project so uploaded files and static assets live in an AWS S3 bucket instead of on local disk. It is aimed at Django developers who are moving file storage to S3, teams that need some files public and others private, and anyone who wants a careful test setup for storage code. After reading this guide you will know how to install the skill, how to ask for help with natural requests, and what the agent will and will not do.
Quick start
- 1Download and unzip the skill. Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for personal use or the project's .claude/skills/ folder for a single project.
- 2Confirm your environment. Check that you have Django 4.2+, an S3 bucket, and IAM credentials or an attached IAM role. Install django-storages[s3] and boto3 with pip.
- 3Ask for the storage change in plain words. Describe which files go to S3, which must be public, and which must stay private. Name your Django version if you know it.
- 4Review the proposed settings. Check that credentials come from environment variables, that default_acl is None, and that media and static use different location prefixes.
- 5Apply and collect static files. Apply the changes, then run collectstatic and confirm that uploads land in your bucket under the expected prefix.
- 6Test without touching real S3. Ask the agent to mock S3 with InMemoryStorage or moto so the test suite does not hit a real bucket.
What the skill makes the agent do
Agent skills are folders of instructions that an AI agent loads when a task matches the skill's description. This one covers Django file storage on AWS S3 using the django-storages package and boto3. When it is active, the agent can wire up the Django 4.2+ STORAGES dict, separate public media from private files, generate temporary presigned download or upload links, keep AWS credentials out of the code, and mock S3 in tests so the test suite never touches a real bucket.
- Configure the STORAGES dict with a default (media) backend and a staticfiles backend that use separate location prefixes.
- Add named public and private backends, for example public images served through a CDN and private documents reached through presigned URLs.
- Generate presigned GET and POST URLs, including direct browser-to-S3 uploads.
- Write a least-privilege IAM policy limited to Get, Put, Delete and ListBucket on the bucket.
- Mock S3 in tests with Django's InMemoryStorage or moto.
Install the skill (ZIP download or Claude apps upload)
Download the ZIP for this skill from this page and unzip it. For a personal install, place the unzipped skill folder in ~/.claude/skills/. For a project-only install, place it in the project's .claude/skills/ folder. The skill's files are SKILL.md plus four reference files: references/configuration.md, references/custom-backends.md, references/presigned-urls.md and references/testing-storages.md.
If you use the Claude apps instead, open Settings, go to Capabilities, then Skills, and upload the skill there.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills
Check the requirements before you start
The skill assumes your project already meets a few conditions. Django 4.2 or newer is required for the STORAGES dict the skill uses. You also need django-storages with the S3 extra and boto3 installed, which the skill's configuration reference installs with a single pip command. You need an AWS account with an S3 bucket and either IAM credentials or an attached IAM role. Moto or Django's InMemoryStorage is optional and is used for tests.
- Python with Django 4.2+, django-storages[s3] and boto3
- An AWS account with an S3 bucket and IAM credentials or an IAM role
- moto or InMemoryStorage for tests (optional)
pip install django-storages[s3] boto3Trigger the skill with natural requests
You do not need to name the skill. The description tells the agent when to load it, using terms such as django-storages, S3, boto3, STORAGES, presigned URL, CloudFront, media files, collectstatic and AWS_STORAGE_BUCKET_NAME. Plain requests that include these words should be enough. Be specific about your goal, your Django version and whether a file must be public or private.
Good requests name the outcome: say what files you store, who should see them and where the bucket is. The agent will then read the matching reference file for the task.
- "Move my Django media uploads to an S3 bucket using STORAGES."
- "Make product photos public through CloudFront but keep invoices private with presigned links."
- "Give me a least-privilege IAM policy for my Django app's S3 bucket."
- "Audit my settings.py for S3 credentials and ACL problems before I deploy."
- "Set up my tests so they never touch the real S3 bucket."
Example: configure media and static storage
For a new project, the skill's minimal example reads the bucket name and region from environment variables, leaves credentials out of settings.py, and defines a default backend for media with location "media" and a staticfiles backend with location "static". It sets default_acl to None so the bucket policy controls access rather than per-object ACLs. On EC2, ECS or Lambda the skill omits the keys entirely so boto3 uses the attached IAM role.
A model field then stores its files through the default backend without further code changes:
class Document(models.Model):
file = models.FileField(upload_to="docs/") # uses STORAGES["default"]Review an existing S3 configuration
If your project already uses S3, ask the agent to audit it. The skill includes an eight-point checklist: credentials, ACLs, the storage backend setting, separate locations, region and custom domain, presigning settings, overwrite cleanup, and IAM scope. Each item tells the agent what to search for and what to confirm. Treat the agent's grep commands and suggested config changes as proposals and have a person check them before applying anything to a live bucket.
- Credentials: values should come from environment variables or an IAM role, not committed literals.
- ACLs: on buckets created after April 2023, ACL values must be None; public access belongs in a bucket policy.
- Backend setting: use STORAGES, not DEFAULT_FILE_STORAGE or STATICFILES_STORAGE on Django 4.2+.
What people use it for
- Moving an existing Django app's user uploads from local disk to an S3 bucket without rewriting model code.
- Serving public product images through a CloudFront domain while keeping invoices private behind presigned links.
- Writing a least-privilege IAM policy for a Django app's bucket.
- Auditing a settings file for committed secrets and ACL settings that will fail on newer buckets.
- Setting up a test suite that exercises file storage code without a real AWS account.
Frequently asked questions
Is the django-storages-s3 skill free?
The skill is published under the MIT licence, as stated on its page. Check the repository's licence file for the full terms before reuse.
What do I need before installing this skill?
You need Django 4.2 or newer, django-storages with the S3 extra, boto3, an AWS account with an S3 bucket, and IAM credentials or an attached IAM role. Moto or InMemoryStorage is optional for tests.
Does the skill run scripts on my machine?
The skill's listing says it does not run scripts, but it does use the network. Its guidance involves AWS calls and suggests grep commands, so review any proposed change before running it.
Can I use this skill with a non-Django project or a non-AWS storage provider?
No. The skill is specific to Django and AWS S3, and its S3 settings and IAM advice would not apply to other frameworks or object stores.
Why does my presigned URL fail?
The skill's guidance says presigning breaks if a backend that issues presigned URLs has a custom_domain set, so that backend should use custom_domain=None with querystring_auth=True. Ask the agent to check that setting on your private backend.
Should I use this skill or the django-expert skill?
Use django-storages-s3 for file storage on S3 itself. Use django-expert for core Django models, DRF and ORM work that produces the files, and the two can be used together.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits Django developers who are moving uploads or static files to AWS S3 and want clear guidance on public versus private storage, presigned links and safe tests. It is not a fit for projects that do not use Django or AWS S3, or for anyone who would apply its audit suggestions to a live production bucket without a person reviewing them first.
Download the skill