Guide for creating coding standards via the Packmind CLI. This skill should be used when users want to create a new coding standard (or add rules to an existing standard) that captures team conventions, best practices, or coding guidelines for distribution to CoPilot.
68
82%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
This skill provides a complete walkthrough for creating coding standards via the Packmind CLI.
Coding standards are collections of rules that capture team conventions, best practices, and coding guidelines. They help maintain consistency across codebases and enable CoPilot to follow your team's specific practices.
Every standard consists of:
{
"name": "Standard Name",
"description": "What the standard covers and why",
"scope": "Where/when the standard applies",
"rules": [
{
"content": "Rule description starting with action verb",
"examples": {
"positive": "Valid code example",
"negative": "Invalid code example",
"language": "TYPESCRIPT"
}
}
]
}Before creating a standard, verify that the required tools are available:
Check if Python 3 is installed:
python3 --versionIf not available, install it:
brew install python3sudo apt-get install python3winget install Python.Python.3Check if packmind-cli is installed:
packmind-cli --versionIf not available, install it:
npm install -g @packmind/cliThen login to Packmind:
packmind-cli loginTo create a standard, follow this process in order, skipping steps only if there is a clear reason why they are not applicable.
Skip this step only when the standard's scope and rules are already clearly defined. It remains valuable even when working with an existing standard.
To create an effective standard, clearly understand:
What problem does this standard solve?
Who will benefit from this standard?
Where does this standard apply?
Example clarifying questions:
Conclude this step when there is a clear sense of the standard's purpose and scope.
Transform the understanding from Step 1 into concrete rules.
Each rule should:
Good rules:
Bad rules:
Examples dramatically improve rule effectiveness. For each rule, consider adding:
Valid language values:
Before running the script, verify that python3 is available (see Prerequisites section). If not installed, install it first.
When creating a new standard from scratch, use the init_playbook.py script to generate a template playbook file:
python3 scripts/init_playbook.py <standard-name> --path <output-directory>Example:
python3 scripts/init_playbook.py typescript-conventions --path .The script generates a JSON file (named <standard-name>.playbook.json) with the following structure:
{
"name": "Your Standard Name",
"description": "A clear description of what this standard covers, why it exists, and what problems it solves.",
"scope": "Where this standard applies (e.g., 'TypeScript files', 'React components', '*.spec.ts test files')",
"rules": [
{
"content": "First rule starting with action verb"
},
{
"content": "Second rule with examples",
"examples": {
"positive": "const x = getValue();",
"negative": "let x = getValue();",
"language": "TYPESCRIPT"
}
}
]
}Before creating the standard via CLI, validate the playbook to catch errors early:
python3 scripts/validate_playbook.py <path-to-playbook.json>Example:
python3 scripts/validate_playbook.py typescript-conventions.playbook.jsonThe validator checks:
If validation fails, fix the reported errors and run validation again before proceeding.
Run the packmind-cli command to create the standard:
packmind-cli standard create <path-to-playbook.json>Example:
packmind-cli standard create ./typescript-conventions.playbook.jsonExpected output on success:
packmind-cli Standard "Your Standard Name" created successfully (ID: <uuid>)"Not logged in" error:
packmind-cli login"Failed to resolve global space" error:
JSON validation errors:
After creation, verify the standard was created correctly:
Standards benefit from iteration. Consider:
To add rules to an existing standard, use the Packmind UI or API.
Here's a complete example creating a TypeScript testing standard:
File: testing-conventions.playbook.json
{
"name": "TypeScript Testing Conventions",
"description": "Enforce consistent testing patterns in TypeScript test files to improve readability, maintainability, and reliability of the test suite.",
"scope": "TypeScript test files (*.spec.ts, *.test.ts)",
"rules": [
{
"content": "Use descriptive test names that explain the expected behavior",
"examples": {
"positive": "it('returns empty array when no items match filter')",
"negative": "it('test filter')",
"language": "TYPESCRIPT"
}
},
{
"content": "Follow Arrange-Act-Assert pattern in test structure",
"examples": {
"positive": "const input = createInput();\nconst result = processInput(input);\nexpect(result).toEqual(expected);",
"negative": "expect(processInput(createInput())).toEqual(expected);",
"language": "TYPESCRIPT"
}
},
{
"content": "Use one assertion per test for better error isolation",
"examples": {
"positive": "it('validates name', () => { expect(result.name).toBe('test'); });\nit('validates age', () => { expect(result.age).toBe(25); });",
"negative": "it('validates user', () => { expect(result.name).toBe('test'); expect(result.age).toBe(25); });",
"language": "TYPESCRIPT"
}
},
{
"content": "Avoid using 'should' at the start of test names - use assertive verb-first naming"
}
]
}Creating the standard:
packmind-cli standard create testing-conventions.playbook.json| Field | Required | Description |
|---|---|---|
| name | Yes | Standard name |
| description | Yes | What and why |
| scope | Yes | Where it applies |
| rules | Yes | At least one rule |
| rules[].content | Yes | Rule text (verb-first) |
| rules[].examples | No | Code examples |
| examples.positive | If examples | Valid code |
| examples.negative | If examples | Invalid code |
| examples.language | If examples | Language ID |
e198635
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.