Write-Coding-Standards-From-File
Write-Coding-Standards-From-File是一款code方向的AI技能,核心价值是Write a coding standards document for a project using the coding styles from the file(s) and/or folder(s) passed as arguments in the prompt,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
Write a coding standards document for a project using the coding styles from the file(s) and/or folder(s) passed as arguments in the prompt.
mkdir -p ./skills/write-coding-standards-from-file && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/write-coding-standards-from-file/SKILL.md -o ./skills/write-coding-standards-from-file/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# Write Coding Standards From File
Use the existing syntax of the file(s) to establish the standards and style guides for the project. If more than one file or a folder is passed, loop through each file or files in the folder, appending the file's data to temporary memory or a file, then when complete use temporary data as a single instance; as if it were the file name to base the standards and style guideline on.
Rules and Configuration
Below is a set of quasi-configuration `boolean` and `string[]` variables. Conditions for handling `true`, or other values for each variable are under the level two heading `## Variable and Parameter Configuration Conditions`.
Parameters for the prompt have a text definition. There is one required parameter **`${fileName}`**, and several optional parameters **`${folderName}`**, **`${instructions}`**, and any **`[configVariableAsParameter]`**.
Configuration Variables
* addStandardsTest = false;
* addToREADME = false;
* addToREADMEInsertions = ["atBegin", "middle", "beforeEnd", "bestFitUsingContext"];
- Default to **beforeEnd**.
* createNewFile = true;
* fetchStyleURL = true;
* findInconsistencies = true;
* fixInconsistencies = true;
* newFileName = ["CONTRIBUTING.md", "STYLE.md", "CODE_OF_CONDUCT.md", "CODING_STANDARDS.md", "DEVELOPING.md", "CONTRIBUTION_GUIDE.md", "GUIDELINES.md", "PROJECT_STANDARDS.md", "BEST_PRACTICES.md", "HACKING.md"];
- For each file in `${newFileName}`, if file does not exist, use that file name and `break`, else continue to next file name of `${newFileName}`.
* outputSpecToPrompt = false;
* useTemplate = "verbose"; // or "v"
- Possible values are `[["v", "verbose"], ["m", "minimal"], ["b", "best fit"], ["custom"]]`.
- Selects one of the two example templates at the bottom of prompt file under the level two heading `## Coding Standards Templates`, or use another composition that is a better fit.
- If **custom**, then apply per request.
Configuration Variables as Prompt Parameters
If any of the variable names are passed to prompt as-is, or as a similar but clearly related text value, then override the default variable value with the value passed to prompt.
Prompt Parameters
* **fileName** = The name of the file that will be analyzed in terms of: indentation, variable naming, commenting, conditional procedures, functional procedures, and other syntax related data for the coding language of the file.
* folderName = The name of the folder that will be used to extract data from multiple files into one aggregated dataset that will be analyzed in terms of: indentation, variable naming, commenting, conditional procedures, functional procedures, and other syntax related data for the coding language of the files.
* instructions = Additional instructions, rules, and procedures that will be provided for unique cases.
* [configVariableAsParameter] = If passed will override the default state of the configuration variable. Example:
- useTemplate = If passed will override the configuration `${useTemplate}` default. Values are `[["v", "verbose"], ["m", "minimal"], ["b", "best fit"]]`.
#### Required and Optional Parameters
* **fileName** - required
* folderName - *optional*
* instructions - *optional*
* [configVariableAsParameter] - *optional*
Variable and Parameter Configuration Conditions
`${fileName}.length > 1 || ${folderName} != undefined`
* If true, toggle `${fixInconsistencies}` to false.
`${addToREADME} == true`
* Insert the coding standards into the `README.md` instead of outputting to the prompt or creating a new file.
* If true, toggle both `${createNewFile}` and `${outputSpecToPrompt}` to false.
`${addToREADMEInsertions} == "atBegin"`
* If `${addToREADME}` is true, then insert the coding standards data at the **beginning** of the `README.md` file after the title.
`${addToREADMEInsertions} == "middle"`
* If `${addToREADME}` is true, then insert the coding standards data at the **middle** of the `README.md` file,
🎯 Best For
- Technical writers
- API documentation teams
- Claude users
- GitHub Copilot users
- Software engineers
💡 Use Cases
- Generating JSDoc/TSDoc comments
- Writing README files for new projects
- Code quality improvement
- Best practice enforcement
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Write-Coding-Standards-From-File to Your Work
Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.
- 4
Review and Refine
Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.
❓ Frequently Asked Questions
Does it follow my documentation style?
Most documentation skills respect existing style. Provide a style guide or example in your prompt.
Is Write-Coding-Standards-From-File compatible with Cursor and VS Code?
Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.
Do I need specific dependencies for Write-Coding-Standards-From-File?
Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.
How do I install Write-Coding-Standards-From-File?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/write-coding-standards-from-file/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Auto-generating without reviewing
AI documentation can contain inaccuracies. Always verify technical accuracy.
Skipping validation
Always test AI-generated code changes, even for simple refactors.
Missing dependency updates
Check if the skill requires updated dependencies or new packages.