A skill your agent uses when handling file uploads, attachments, private/public file access, or S3 storage configuration.

MITAuto-check passedBackend & APIs

Install Frappe Core Files

skills CLI
$ npx skills add Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-core-files -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Impertio-Studio/Frappe_Claude_Skill_Package frappe-core-files --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/source/core/frappe-core-files .claude/skills/frappe-core-files && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
frappe-core-files
GitHub stars
189
Token cost
~2.2k tokens
SKILL.md length
475 words
Files
4 (incl. references)
Skills in repo
61
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when handling file uploads, attachments, private/public file access, or S3 storage configuration.

  • Works in 3 steps: Administrator — unrestricted access to… → Public files (is_private=0) — readable… → Private files (is_private=1) — access…
  • Handling file uploads
  • SKILL.md covers Quick Reference, Decision Tree, File DocType: Core Fields and File URL Patterns, plus 8 more sections
  • Calls curl

What it does

Frappe Core Files is an agent skill from Impertio-Studio/Frappe_Claude_Skill_Package. Use when handling file uploads, attachments, private/public file access, or S3 storage configuration. Prevents broken file URLs, permission leaks on private files, and failed uploads from incorrect MIME handling. Covers File DocType, frappe.getfile, upload API, private vs public directories, S3 integration, file URL patterns, attach field types. Keywords: file, upload, attachment, File DocType, private, public, S3, fileurl, getfile, attach, upload not working, file missing, broken file link, download file, image…

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/anti-patterns.md` and `references/examples.md`). Compatibility notes: Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16.

It sits in Backend & APIs, covering File uploads and storage. The repository describes itself as: 60 deterministic Claude AI skills for Frappe Framework & ERPNext v14-v16 development and operations. The licence is MIT.

When your agent uses it

  • Handling file uploads
  • Private/public file access
  • S3 storage configuration

Example prompts

  • “/frappe-core-files”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16.

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Administrator — unrestricted access to all files
  2. Public files (is_private=0) — readable by anyone with the URL (no authentication required for read)
  3. Private files (is_private=1) — access requires

What it can do on your machine

Read from SKILL.md and the folder at commit 36cfa80. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16.

    From compatibility in the SKILL.md frontmatter.

Context cost

Frappe Core Files loads about 2.2k tokens when it runs, and up to ~4.4k if it reads all its reference files. Until then it costs about 143 tokens; SKILL.md has 475 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~143
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Impertio-Studio/Frappe_Claude_Skill_Package at commit 36cfa80, republished under its MIT licence (© Impertio-Studio). 475 words, ~2,173 tokens.

Download SKILL.mdSave it as .claude/skills/frappe-core-files/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
frappe-core-files
description
Use when handling file uploads, attachments, private/public file access, or S3 storage configuration. Prevents broken file URLs, permission leaks on private files, and failed uploads from incorrect MIME handling. Covers File DocType, frappe.get_file, upload API, private vs public directories, S3 integration, file URL patterns, attach field types. Keywords: file, upload, attachment, File DocType, private, public, S3, file_url, get_file, attach, upload not working, file missing, broken file link, download file, image not showing, attachment error..
compatibility
Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16.
license
MIT
metadata.author
OpenAEC-Foundation
metadata.version
2.0

Frappe File Management

Quick Reference

ActionMethodNotes
Save file from bytessave_file(fname, content, dt, dn)Returns File doc
Save file from URLsave_url(file_url, fname, dt, dn)Creates File doc from URL
Read file contentfrappe.get_file(fname)Returns [filename, content]
Get file pathget_file_path(file_name)Resolves to absolute path
Upload via HTTPPOST /api/method/upload_fileMultipart form upload
Delete filefrappe.delete_doc("File", name)Removes doc + filesystem file
Attach printfrappe.attach_print(dt, dn, print_format)Returns {"fname", "fcontent"}
Get cached docfrappe.get_cached_doc("File", name)Read-only, cached

Decision Tree

What file operation do you need?
│
├─ Upload a file from user input?
│  ├─ Via web form → Attach field type (auto-handles upload)
│  └─ Via API → POST /api/method/upload_file
│
├─ Create a file programmatically?
│  ├─ From bytes/content → save_file(fname, content, dt, dn)
│  ├─ From external URL → save_url(file_url, fname, dt, dn)
│  └─ Full control → frappe.get_doc({"doctype": "File", ...}).insert()
│
├─ Read file content?
│  ├─ By filename → frappe.get_file(fname)
│  └─ By File doc → file_doc.get_content()
│
├─ Public or private?
│  ├─ Public (anyone with link) → is_private=0, URL: /files/fname
│  └─ Private (permission-based) → is_private=1, URL: /private/files/fname
│
└─ Generate PDF attachment?
   └─ frappe.attach_print(doctype, name, print_format)

File DocType: Core Fields

FieldTypeDescription
file_nameDataFilename without path
file_urlDataURL path (e.g., /files/report.pdf)
file_typeDataExtension (PDF, PNG, DOCX, etc.)
is_privateCheck0 = public, 1 = private
is_folderCheckTrue for folder entries
folderLink → FileParent folder
attached_to_doctypeLink → DocTypeParent document type
attached_to_nameDataParent document name
attached_to_fieldDataField name on parent
content_hashDataSHA-256 for deduplication
file_sizeIntSize in bytes

File URL Patterns

TypeURL PatternFilesystem Path
Public/files/{filename}{site}/public/files/{filename}
Private/private/files/{filename}{site}/private/files/{filename}
Remotehttps://...Not stored locally
API/api/method/{path}Generated dynamically

Valid URL prefixes: http://, https://, /api/method/, /files/, /private/files/.

ALWAYS use /private/files/ for sensitive documents. Public files are accessible to anyone with the URL, including unauthenticated users.


Permission Model

Frappe files use a three-tier permission model:

  1. Administrator — unrestricted access to all files
  2. Public files (is_private=0) — readable by anyone with the URL (no authentication required for read)
  3. Private files (is_private=1) — access requires:
    • User is the file owner, OR
    • User has explicit share on the file, OR
    • User has read permission on the attached_to_doctype/attached_to_name document

NEVER store sensitive data as public files. ALWAYS set is_private=1 for documents containing personal data, financial records, or confidential information.


Programmatic File Operations

Save File from Content
python
from frappe.utils.file_manager import save_file

# Save a generated CSV
csv_content = "Name,Amount\nACME,1000\nGlobex,2000"
file_doc = save_file(
    fname="report.csv",
    content=csv_content.encode("utf-8"),
    dt="Sales Invoice",           # attach to this DocType
    dn="SINV-00001",              # attach to this document
    folder="Home/Attachments",    # optional folder
    is_private=1,                 # private file
)
# file_doc.file_url → "/private/files/report.csv"
Show full SKILL.md (191 more words)Show less
Save File from URL
python
from frappe.utils.file_manager import save_url

file_doc = save_url(
    file_url="https://example.com/logo.png",
    filename="company-logo.png",
    dt="Company",
    dn="My Company",
    folder="Home",
    is_private=0,
)
Read File Content
python
# By filename
filename, content = frappe.get_file("report.csv")

# By File document
file_doc = frappe.get_doc("File", {"file_name": "report.csv"})
content_bytes = file_doc.get_content()
Create File Document Directly
python
file_doc = frappe.get_doc({
    "doctype": "File",
    "file_name": "generated-report.pdf",
    "attached_to_doctype": "Sales Invoice",
    "attached_to_name": "SINV-00001",
    "is_private": 1,
    "content": pdf_bytes,  # raw bytes — written to disk on insert
}).insert(ignore_permissions=True)
Generate and Attach PDF
python
# Create PDF attachment dict (for use with sendmail)
pdf_attachment = frappe.attach_print(
    "Sales Invoice",
    "SINV-00001",
    print_format="Standard",
)
# Returns: {"fname": "Sales Invoice - SINV-00001.pdf", "fcontent": <bytes>}

# Save PDF as file attachment
from frappe.utils.file_manager import save_file

pdf = frappe.get_print("Sales Invoice", "SINV-00001", print_format="Standard", as_pdf=True)
save_file("invoice.pdf", pdf, "Sales Invoice", "SINV-00001", is_private=1)

File Upload via REST API

bash
# Upload file attached to a document
curl -X POST https://site.example.com/api/method/upload_file \
  -H "Authorization: token api_key:api_secret" \
  -F "file=@/path/to/document.pdf" \
  -F "doctype=Sales Invoice" \
  -F "docname=SINV-00001" \
  -F "is_private=1"

Response:

json
{
  "message": {
    "name": "FILE-00001",
    "file_name": "document.pdf",
    "file_url": "/private/files/document.pdf",
    "is_private": 1
  }
}

File Size and Extension Limits

Default max file size: 10 MB per attachment.

Override in site_config.json:

json
{
  "max_file_size": 20971520
}

Max attachments per document: Set via Customize Form → Max Attachments field on the DocType.

Check file size programmatically:

python
from frappe.utils.file_manager import check_max_file_size
check_max_file_size(content)  # raises MaxFileSizeReachedError if too large

Attach Field Types

Field TypeStoresUI
AttachSingle file URLFile picker + upload button
Attach ImageSingle image URLImage preview + upload

Both store the file_url string in the field value. The File DocType record is created separately with attached_to_field set.


S3 / Cloud Storage Integration

Frappe supports custom file storage via the delete_file_data_content hook and custom upload handlers.

S3 via frappe-s3-attachment or similar app
python
# In hooks.py of custom app
delete_file_data_content = "my_app.storage.delete_from_s3"

ALWAYS test file deletion when using custom storage backends — the default delete_file_from_filesystem only handles local files.

Configuration Pattern
python
# site_config.json for S3-compatible storage
{
  "s3_bucket": "my-frappe-files",
  "s3_region": "eu-west-1",
  "s3_access_key": "AKIA...",
  "s3_secret_key": "...",
}

Version Differences

Featurev14v15v16
File DocTypeAvailableAvailableAvailable
content_hash dedupAvailableAvailableAvailable
Image optimizationManualAuto (1920x1080, 85%)Auto
Import/Export ZipNot availableAvailableAvailable

See Also

© Impertio-Studio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/source/core/frappe-core-files of Impertio-Studio/Frappe_Claude_Skill_Package.

  • SKILL.md
  • references/.gitkeep
  • references/anti-patterns.md
  • references/examples.md

Open the folder on GitHubat commit 36cfa80

Compare with similar skills

Frappe Core Files next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Frappe Core Files compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Frappe Core Files this skillImpertio-Studio/Frappe_Claude_Skill_Package189—~2.2kAutomated safety check: PassMIT
Stripe Projectsfossasia/eventyay1.7k5 repos~2kAutomated safety check: NotesApache-2.0
FoundatioFoundatioFx/Foundatio2.1k—~3.9kAutomated safety check: PassApache-2.0
Spatialduckdb/duckdb-skills6031 repos~1kAutomated safety check: NotesMIT
R Oopab604/claude-code-r-skills2072 repos~1.9kAutomated safety check: PassMIT
Edgestore Setupedgestorejs/edgestore454—~1.8kAutomated safety check: PassMIT

Similar skills

  • Stripe Projects

    fossasia/eventyay

    A skill your agent uses when the user wants to provision infrastructure or third-party services using Stripe Projects.

    1.7k GitHub starsUsed in 5 repos~2k tokens
    Backend & APIsAuto-check: notes
  • Foundatio

    FoundatioFx/Foundatio

    A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.

    2.1k GitHub stars~3.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Spatial

    duckdb/duckdb-skills

    Official

    Answer questions about spatial data using DuckDB. An agent skill from duckdb/duckdb-skills.

    603 GitHub starsUsed in 1 repo~1k tokens
    Backend & APIsAuto-check: notes
  • R Oop

    ab604/claude-code-r-skills

    R object-oriented programming guide for S7, S3, S4, and vctrs.

    207 GitHub starsUsed in 2 repos~1.9k tokens
    Backend & APIsAuto-check passed
  • Edgestore Setup

    edgestorejs/edgestore

    A skill your agent uses when adding, extending, or troubleshooting EdgeStore file uploads, upload UI, or bucket access policies in a TypeScript/React application.

    454 GitHub stars~1.8k tokensUpdated today
    Backend & APIsAuto-check passed
  • S3 Explore

    duckdb/duckdb-skills

    Official

    Explore and query data on S3, Cloudflare R2, GCS, MinIO, or any S3-compatible storage.

    603 GitHub starsUsed in 1 repo~848 tokens
    Backend & APIsAuto-check: notes

More from Impertio-Studio/Frappe_Claude_Skill_Package

All 61 skills in this repo
  • Frappe Ops Website Deploy

    Impertio-Studio/Frappe_Claude_Skill_Package

    Deploy HTML/CSS websites to ERPNext/Frappe (v15/v16) as Web Pages via the REST API.

    189 GitHub stars~2.5k tokensUpdated 23 days ago
    Auto-check passed
  • Frappe Agent Architect

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when designing multi-app Frappe architectures, deciding whether to split functionality into separate apps, or implementing cross-app communication patterns.

    189 GitHub stars~2.8k tokensUpdated 23 days ago
    Auto-check passed
  • Frappe Agent Debugger

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when debugging Frappe errors, using bench console for live inspection, analyzing tracebacks, or reading Frappe log files.

    189 GitHub stars~2.9k tokensUpdated 23 days ago
    Auto-check passed
  • Frappe Agent Interpreter

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when receiving vague or unclear ERPNext/Frappe development requests that need interpretation.

    189 GitHub stars~3.2k tokensUpdated 23 days ago
    Auto-check passed
  • Frappe Agent Migrator

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when migrating a Frappe app between major versions, detecting breaking API changes, or resolving post-migration errors.

    189 GitHub stars~2.8k tokensUpdated 23 days ago
    Auto-check: notes
  • Frappe Agent Validator

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when reviewing or validating Frappe/ERPNext code against best practices and common pitfalls.

    189 GitHub stars~2.8k tokensUpdated 23 days ago
    Auto-check passed

Categories

Questions about Frappe Core Files

What does Frappe Core Files do?

A skill your agent uses when handling file uploads, attachments, private/public file access, or S3 storage configuration. Frappe Core Files is an agent skill from Impertio-Studio/Frappe_Claude_Skill_Package. Use when handling file uploads, attachments, private/public file access, or S3 storage configuration.

When should I use Frappe Core Files?

Frappe Core Files fits situations like: handling file uploads; private/public file access; S3 storage configuration.

How do I install Frappe Core Files in Claude Code?

Run `npx skills add Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-core-files -a claude-code`. Or copy the skill folder (skills/source/core/frappe-core-files in Impertio-Studio/Frappe_Claude_Skill_Package) into .claude/skills/frappe-core-files in your project. Claude Code loads it when a task matches its description.

How do I install Frappe Core Files in Codex?

Run `npx skills add Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-core-files -a codex`. Or copy the skill folder (skills/source/core/frappe-core-files in Impertio-Studio/Frappe_Claude_Skill_Package) into .agents/skills/frappe-core-files in your project. Codex loads it when a task matches its description.

Can I use Frappe Core Files in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-core-files -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/frappe-core-files, .gemini/skills/frappe-core-files, .github/skills/frappe-core-files and .opencode/skills/frappe-core-files in your project.

What does Frappe Core Files need to run?

Going by SKILL.md and its folder, Frappe Core Files needs the command-line tools its instructions call (curl). Our summary lists: Python 3. Compatibility (from SKILL.md): Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16..

Does Frappe Core Files access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Frappe Core Files safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Frappe Core Files use?

Frappe Core Files is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Frappe Core Files use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.

What are the alternatives to Frappe Core Files?

Skills that share tags, products or a category with Frappe Core Files: Stripe Projects (fossasia/eventyay, 1.7k stars), Foundatio (FoundatioFx/Foundatio, 2.1k stars), Spatial (duckdb/duckdb-skills, 603 stars) and R Oop (ab604/claude-code-r-skills, 207 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Frappe Core Files?

Impertio-Studio (a GitHub organization) maintains it in Impertio-Studio/Frappe_Claude_Skill_Package, which has 189 GitHub stars. The repository holds 61 skills in this directory. The repository was last updated on September 17, 2026.

Source: Impertio-Studio/Frappe_Claude_Skill_Package on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.