file-creator
Skill0 starsChanged 2 months agoMITView on GitHub
This skill enables the LLM to help users create files by understanding their intent and producing a strictly-formatted JSON output that describes what file to create. If the file is too large, the content can be separated into two or more parts, first to use file-creator to create the file and first part of the content, then the following parts can be output by file-changer skills to append. file-creator Invoke this skill whenever the user's request implies creating a new…
- Reads credentials
In this repository14 other files it gives its agents.
- cmd-runnerSkill
- code-runnerSkill
- curlSkill
- db-accessorSkill
- file-changerSkill
- file-finderSkill
- file-grepSkill
- file-listSkill
- file-readerSkill
- folder-creatorSkill
- folder-finderSkill
- folder-listSkill
- scpSkill
- sshSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
If the file is too large, the content can be separated into two or more parts, first to use file-creator to create the file and first part …
- Distinctive: line 29
When the skill is triggered, the LLM must:
- Very specific: line 102
All string values must properly escape special characters (", \, newline as \n, tab as \t).
- Very specific: line 103
Do NOT wrap content in additional Markdown fences — it is a plain string.
- Very specific: line 104
Do NOT emit multiple file-creator blocks in a single response.
- Distinctive: line 110
If the user or LLM decision result does not specify a file name, the skill should not be executed.
- Distinctive: line 198
Never create files outside the user's intent (no arbitrary system paths).
- Distinctive: line 201
Always show the JSON block so the user can review before execution.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
📄 File Creator Skill
Overview
This skill enables the LLM to help users create files by understanding their intent and producing a strictly-formatted JSON output that describes what file to create.
If the file is too large, the content can be separated into two or more parts, first to use file-creator to create the file and first part of the content, then the following parts can be output by file-changer skills to append.
Skill Name
file-creator
When to Use This Skill
Invoke this skill whenever the user's request implies creating a new file. Look for phrases such as:
- "create a file ..."
- "make a new file ..."
- "generate a ... file"
- "write a ... file"
- "save this as a file"
- "new script/document/config/readme ..."
- "produce a JSON/YAML/HTML/Python/Markdown file"
The skill applies to any file type: source code (.py, .js, .java, .ts, .go, .c, .cpp, ...), config (.json, .yaml, .toml, .ini, .env), markup (.md, .html, .xml), plain text (.txt, .log), and more.
What the LLM Must Do
When the skill is triggered, the LLM must:
- Extract the following from the user's request (asking clarifying questions only if truly ambiguous):
- file_path (required): The target path where the file should be created (relative or absolute). If the user does not specify a directory, default to the current working directory
./. - filename (required): The final file name including extension. Infer a sensible name/extension from the description if omitted (e.g. "python hello world" →
hello.py). - content (required): The complete content of the file.
- language / file_type (optional): The language or format label (e.g.
python,json,markdown,text). - overwrite (optional):
trueif the user explicitly asks to replace/overwrite an existing file, otherwisefalse. - encoding (optional): Defaults to
utf-8if not specified. - description (optional): One-line summary of the file's purpose.
- sequential (optional): if the file creation is just one part of LLM decision flows, it is presented for next task.
- prompt (optional): when sequential is presented, the prompt is used for next input to LLM for next task.
- file_path (required): The target path where the file should be created (relative or absolute). If the user does not specify a directory, default to the current working directory
- Produce a response containing a single fenced JSON code block that STRICTLY follows the schema below. No other JSON blocks in the reply.
Required JSON Output Schema
The LLM's response MUST contain exactly pure JSON format string with no code blocks start with "```". When there is no content specified by the user, just directly create an empty file.
{
"action": "create_file",
"thinking": "<ai-thinking-trace>",
"sequential": {
"prompt": "prompt used for next task"
},
"properties": [
{
"name": "filePath",
"value": "<directory-or-full-path>"
},
{
"name": "fileName",
"value": "<name-with-extension>"
},
{
"name": "encoding",
"value": "utf-8"
},
{
"name": "encoding",
"value": "utf-8"
},
{
"name": "overwrite",
"value": "false"
},
{
"name": "content",
"value": ""
}
]
}Field Rules
| Field | Type | Required | Notes |
action | string | Yes | Must be exactly "create_file". |
file_path | string | Yes | Directory portion OR full path. Use "./" if unspecified. |
filename | string | Yes | Filename including extension. Omit if file_path already includes it. |
language | string | No | e.g. python, json, markdown, yaml, text. |
encoding | string | No | Default utf-8. |
overwrite | boolean | No | true to overwrite; default false. |
description | string | No | Human-readable purpose of the file. |
content | string | Yes | Full file contents as a JSON string. Need to populate escaped contents as it is in a JSON string. Escape newlines as \n. |
sequential | object | No | Whether the grep result should feed a follow-up AI task. Default null. |
prompt | string | No | Follow-up prompt used when sequential is presented |
Formatting Requirements
- The JSON block must be valid JSON (parseable by
json.loads). - All string values must properly escape special characters (
",\, newline as\n, tab as\t). - Do NOT wrap
contentin additional Markdown fences — it is a plain string. - Do NOT emit multiple
file-creatorblocks in a single response.
Response Pattern for the LLM
A typical assistant reply should look like, no other output is needed. The response should be in pure json format and if the user do not specify the content, no need to prompt for file content. Overwrite property should be set to true only WHEN user requests to do so EXPLICITLY. If the user or LLM decision result does not specify a file name, the skill should not be executed. The file content should escape any known text format, like html, xml, json. The string should be in escaped mode.
{ "action": "create_file", "thinking": "User asked for a simple hello-world Python program; inferring filename hello.py in current directory.", "properties": [ { "name": "filePath", "value": "./" }, { "name": "fileName", "value": "hello.py" }, { "name": "language", "value": "python" }, { "name": "encoding", "value": "utf-8" }, { "name": "overwrite", "value": "false" }, { "name": "description", "value": "A simple hello-world Python program" }, { "name": "content", "value": "def main():\n print("Hello, world!")\n\nif name == "main":\n main()\n" } ] }
Decision Logic
User Prompt
|
+-- Does the request imply creating/generating/saving a new file?
| |
| +-- YES --> Extract path/name/content --> Emit ONE `file-creator` JSON block
| |
| +-- NO --> Do not use this skillExamples
Example 1: Explicit path and content
User: "Create a file config/app.json containing {"debug": true, "port": 8080}."
LLM emits: { "action": "create_file", "thinking": "User explicitly provided the path config/app.json and the JSON content to write.", "properties": [ { "name": "filePath", "value": "config/" }, { "name": "fileName", "value": "app.json" }, { "name": "language", "value": "json" }, { "name": "encoding", "value": "utf-8" }, { "name": "overwrite", "value": "false" }, { "name": "description", "value": "Application configuration" }, { "name": "content", "value": "{\n "debug": true,\n "port": 8080\n}\n" } ] }
Example 2: Inferred name
User: "Write me a README for my project that just says 'Hello World'."
LLM emits: { "action": "create_file", "thinking": "User asked for a README with 'Hello World' content; inferring README.md in the current directory.", "properties": [ { "name": "filePath", "value": "./" }, { "name": "fileName", "value": "README.md" }, { "name": "language", "value": "markdown" }, { "name": "encoding", "value": "utf-8" }, { "name": "overwrite", "value": "false" }, { "name": "description", "value": "Project README" }, { "name": "content", "value": "# Hello World\n" } ] }
Example 3: Overwrite
User: "Replace notes.txt with the text 'new notes'."
LLM emits: { "action": "create_file", "thinking": "User explicitly asked to replace notes.txt, so overwrite must be true.", "properties": [ { "name": "filePath", "value": "./" }, { "name": "fileName", "value": "notes.txt" }, { "name": "language", "value": "text" }, { "name": "encoding", "value": "utf-8" }, { "name": "overwrite", "value": "true" }, { "name": "description", "value": "Replaces notes.txt with new content" }, { "name": "content", "value": "new notes\n" } ] }
Safety Guidelines
- Never create files outside the user's intent (no arbitrary system paths).
- Refuse to overwrite unless explicitly requested.
- Refuse suspicious paths (e.g.,
C:\Windows\,/etc/,~/.ssh/). - Always show the JSON block so the user can review before execution.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

