Home / Market / write coding standards from file

write coding standards from file

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.

skill★ 417949622 dlskills.shMITInstall in CosmosUpstream Source

Documentation & Preview

--- name: write-coding-standards-from-file description: '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.'

---

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

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

Required and Optional Parameters

Variable and Parameter Configuration Conditions

${fileName}.length > 1 || ${folderName} != undefined

${addToREADME} == true

${addToREADMEInsertions} == "atBegin"

${addToREADMEInsertions} == "middle"

${addToREADMEInsertions} == "beforeEnd"

${addToREADMEInsertions} == "bestFitUsingContext"

${addStandardsTest} == true

${createNewFile} == true

${fetchStyleURL} == true

${findInconsistencies} == true

${fixInconsistencies} == true

typeof ${newFileName} == "string"

typeof ${newFileName} != "string"

${outputSpecToPrompt} == true

${useTemplate} == "v" || ${useTemplate} == "verbose"

${useTemplate} == "m" || ${useTemplate} == "minimal"

${useTemplate} == "b" || ${useTemplate} == "best"

${useTemplate} == "custom" || ${useTemplate} == "<ANY_NAME>"

if ${fetchStyleURL} == true

Depending on the programming language, for each link in list below, run #fetch (URL), if programming language is ${fileName} == [<Language> Style Guide].

Fetch Links

Coding Standards Templates

"m", "minimal"

1. Introduction

2. Naming Conventions

3. Formatting and Style

4. Commenting

5. Error Handling

6. Best Practices and Anti-Patterns