tessl i github:cteyton/packmind --skill packmind-create-standardGuide 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 Claude.
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 Claude to follow your team's specific practices.
Every standard consists of:
{
"name": "Standard Name",
"description": "What the standard covers and why",
"summary": "One-sentence description of when to apply the rules (optional)",
"scope": "Where/when the standard applies (e.g., 'TypeScript files', 'React components')",
"rules": [
{
"content": "Rule description starting with action verb",
"examples": {
"positive": "Valid code example",
"negative": "Invalid code example",
"language": "TYPESCRIPT"
}
}
]
}Note: The Packmind CLI currently requires the scope field. The summary field is used in other workflows (like MCP) but not yet supported by the CLI.
scope vs summaryscope (required by CLI): WHERE the standard applies - file patterns, technologies, specific locations
"TypeScript test files (*.spec.ts, *.test.ts)", "React functional components"summary (optional, not yet CLI-supported): WHEN/WHY to apply - high-level purpose and trigger condition
"Apply when writing tests to ensure consistency", "Use when handling user data for privacy compliance"Before creating a standard, verify that packmind-cli is available:
Check 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.
Gather essential information before drafting the standard.
Study the user's request and identify critical gaps. The number of questions should match the request clarity:
Examples of focused questions:
Introduce questions with a simple phrase about needing clarification, then list as bullet points—no numbering, no category headers.
Do not open or scan repository files unless the user explicitly points to them (provides file paths or requests project-wide review). If source references are needed, ask the user to supply them.
Take brief notes on:
Keep notes concise—just enough to unlock drafting.
Transform the understanding into concrete rules. Do not add examples yet - examples will be added in Step 3.
.packmind/standards/_drafts/ (create the folder if missing) using filename <slug>-draft.md (lowercase with hyphens)# <Standard Title>## Rules as bullet points following the Rule Writing Guidelines belowEach rule should follow these format requirements:
Rules describe WHAT to do, not WHY. Strip justifications and benefits—let examples demonstrate value.
Common fluff patterns to remove:
Bad (includes rationale):
Document props with JSDoc comments to provide IDE intellisense and improve developer experience.
Good (action only):
Document component props with JSDoc comments (
/** ... */) describing purpose, expected values, and defaults.
If a rule addresses 2+ distinct concerns, proactively split it into separate rules:
Bad (too broad):
Create centralized color constants in dedicated files for consistent palettes, using semantic naming based on purpose rather than specific color values.
Good (split into focused rules):
theme/colors.ts using semantic names (e.g., primary, error)Inline examples (code, paths, patterns) within the rule content are optional. Only include them when they clarify something not obvious from the rule text.
Types of useful inline examples:
const, async/await, /** ... */infra/repositories/, domain/entities/.spec.ts, I{Name} prefixGood rules with inline examples:
IUserService)"infra/repositories/"Good rules without inline examples:
Bad rules:
After saving the draft file, write a concise summary that captures:
Then proceed directly to Step 3.
Add illustrative examples to each rule in the draft file.
### Positive Example showing the compliant approach### Negative Example highlighting the anti-pattern to avoidtypescript, sql, javascript)Valid language values for code blocks:
Then proceed directly to Step 4.
Create a JSON playbook file named <standard-name>.playbook.json based on the draft content:
{
"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"
}
}
]
}TYPESCRIPT, TYPESCRIPT_TSX, JAVASCRIPT, JAVASCRIPT_JSX, PYTHON, JAVA, GO, RUST, CSHARP, PHP, RUBY, KOTLIN, SWIFT, SQL, HTML, CSS, SCSS, YAML, JSON, MARKDOWN, BASH, GENERIC
Before running the CLI command, you MUST get explicit user approval:
---
Name: <standard name>
Description: <description>
Scope: <scope>
Rules:
1. <rule content>
- ✅ <positive example>
- ❌ <negative example>
2. <rule content>
- ✅ <positive example>
- ❌ <negative example>
...
---Provide the file path to the playbook JSON file so users can open and edit it directly if needed.
Ask: "Here is the standard that will be created on Packmind. The playbook file is at <path> if you want to review or edit it. Do you approve?"
Wait for explicit user confirmation before proceeding to Step 6.
If the user requests changes, go back to earlier steps to make adjustments.
Re-read the playbook file from disk to capture any user edits.
Compare with the original content you created in Step 4.
If changes were detected:
If no changes: Proceed directly to submission.
Run the packmind-cli command:
packmind-cli standards create <path-to-playbook.json> --origin-skill=create-standardExample:
packmind-cli standards create ./typescript-conventions.playbook.json --origin-skill=create-standardExpected 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 the standard is successfully created, delete the temporary files:
<standard-name>.playbook.json).packmind/standards/_drafts/ if it existsOnly clean up on success - if the CLI command fails, keep the files so the user can retry.
After successful creation, check if the standard fits an existing package:
packmind-cli install --list to get available packages<package-slug> package."<package-slug>packmind-cli packages add --to <package-slug> --standard <standard-slug> --origin-skill=create-standardpackmind-cli install to sync the changes?"packmind-cli installHere'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 standards create testing-conventions.playbook.json --origin-skill=create-standard| Field | Required | Description |
|---|---|---|
| name | Yes | Standard name |
| description | Yes | What and why |
| summary | No | One-sentence (not yet supported by CLI) |
| scope | Yes (CLI) | Where it applies |
| rules | Yes | At least one rule |
| rules[].content | Yes | Rule text (verb-first, max ~25 words) |
| rules[].examples | No | Code examples |
| examples.positive | If examples | Valid code |
| examples.negative | If examples | Invalid code |
| examples.language | If examples | Language ID |
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.