.claude/skills/rule-creator/SKILL.md
Creates rule files for the Claude Code framework. Rules are markdown files in .claude/rules/ that are auto-loaded by Claude Code.
npx skillsauth add oimiragieo/agent-studio rule-creatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create rule files in .claude/rules/. Rules are auto-discovered by Claude Code and loaded into agent context.
Before creating, check if rule already exists:
test -f .claude/rules/<rule-name>.md && echo "EXISTS" || echo "NEW"
If EXISTS → use Read to inspect the current rule file, then Edit to apply changes directly. Run the post-creation integration steps (Step 4) after updating.
If NEW → continue with Step 0.5.
Before proceeding with creation, run the ecosystem companion check:
companion-check.cjs from .claude/lib/creators/companion-check.cjscheckCompanions("rule", "{rule-name}") to identify companion artifactsThis step is informational (does not block creation) but ensures the full artifact ecosystem is considered.
Rules are simple markdown files:
# Rule Name
## Section 1
- Guideline 1
- Guideline 2
## Section 2
- Guideline 3
- Guideline 4
Example: testing.md
# Testing
## Test-Driven Development
- Use TDD for new features and bug fixes (Red-Green-Refactor cycle)
- Write failing test first, then minimal code to pass, then refactor
- Never write production code without a failing test first
## Test Organization
- Add unit tests for utilities and business logic
- Add integration tests for API boundaries
- Keep tests deterministic and isolated (no shared state)
- Place test files in `tests/` directory mirroring source structure
// Validate rule name (lowercase, hyphens only)
const ruleName = args.name.toLowerCase().replace(/[^a-z0-9-]/g, '-');
// Validate content is not empty
if (!args.content || args.content.trim().length === 0) {
throw new Error('Rule content cannot be empty');
}
const rulePath = `.claude/rules/${ruleName}.md`;
// Format content as markdown
const content = args.content.startsWith('#')
? args.content
: `# ${ruleName.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase())}\n\n${args.content}`;
await writeFile(rulePath, content);
pnpm index-rules
Verify total_rules count increased. Rule is invisible to agents until indexed.
Rules in .claude/rules/ are automatically loaded by Claude Code. No manual registration needed.
// Verify file was created
const fileExists = await exists(rulePath);
if (!fileExists) {
throw new Error('Rule file creation failed');
}
const {
runIntegrationChecklist,
queueCrossCreatorReview,
} = require('.claude/lib/creators/creator-commons.cjs');
await runIntegrationChecklist('rule', rulePath);
await queueCrossCreatorReview('rule', rulePath, {
artifactName: ruleName,
createdBy: 'rule-creator',
});
After rule creation, run integration checklist:
const {
runIntegrationChecklist,
queueCrossCreatorReview,
} = require('.claude/lib/creators/creator-commons.cjs');
// 1. Run integration checklist
const result = await runIntegrationChecklist('rule', '.claude/rules/<rule-name>.md');
// 2. Queue cross-creator review
await queueCrossCreatorReview('rule', '.claude/rules/<rule-name>.md', {
artifactName: '<rule-name>',
createdBy: 'rule-creator',
});
// 3. Review impact report
// Check result.mustHave for failures - address before marking complete
Integration verification:
.claude/rules/Skill({
skill: 'rule-creator',
args: `--name code-standards --content "# Code Standards
## Organization
- Prefer small, cohesive files over large ones
- Keep interfaces narrow; separate concerns by feature
## Style
- Favor immutability; avoid in-place mutation
- Validate inputs and handle errors explicitly"`,
});
Skill({
skill: 'rule-creator',
args: `--name git-workflow --content "# Git Workflow
## Commit Guidelines
- Keep changes scoped and reviewable
- Use conventional commits: feat:, fix:, refactor:, docs:, chore:
## Branch Workflow
- Create feature branches from main
- Never force-push to main/master"`,
});
skill-creator - Create detailed workflows (for complex guidance needing a full SKILL.md)hook-creator - Create enforcement hooks that accompany governance rules.claude/schemas/ if the rule produces structured output or has configurable parameters..claude/rules/ are auto-loaded, but domain-specific rules should be referenced in agent prompts).node .claude/tools/cli/validate-integration.cjs <rule-path> before marking creation complete. A rule that fails validation may have broken references or conflicts..claude/context/memory/ (learnings.md, decisions.md, issues.md). Without memory, the creation is invisible to future sessions.Before starting:
Read .claude/context/memory/learnings.md
After completing:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.mdASSUME INTERRUPTION: If it's not in memory, it didn't happen.
This skill is part of the Creator Ecosystem. When research uncovers gaps, trigger the appropriate companion creator:
| Gap Discovered | Required Artifact | Creator to Invoke | When |
| ---------------------------------------- | ----------------- | -------------------------------------- | --------------------------------- |
| Domain knowledge needs a reusable skill | skill | Skill({ skill: 'skill-creator' }) | Gap is a full skill domain |
| Existing skill has incomplete coverage | skill update | Skill({ skill: 'skill-updater' }) | Close skill exists but incomplete |
| Capability needs a dedicated agent | agent | Skill({ skill: 'agent-creator' }) | Agent to own the capability |
| Existing agent needs capability update | agent update | Skill({ skill: 'agent-updater' }) | Close agent exists but incomplete |
| Domain needs code/project scaffolding | template | Skill({ skill: 'template-creator' }) | Reusable code patterns needed |
| Behavior needs pre/post execution guards | hook | Skill({ skill: 'hook-creator' }) | Enforcement behavior required |
| Process needs multi-phase orchestration | workflow | Skill({ skill: 'workflow-creator' }) | Multi-step coordination needed |
| Artifact needs structured I/O validation | schema | Skill({ skill: 'schema-creator' }) | JSON schema for artifact I/O |
| User interaction needs a slash command | command | Skill({ skill: 'command-creator' }) | User-facing shortcut needed |
| Repeated logic needs a reusable CLI tool | tool | Skill({ skill: 'tool-creator' }) | CLI utility needed |
| Narrow/single-artifact capability only | inline | Document within this artifact only | Too specific to generalize |
This creator skill is part of a coordinated creator ecosystem. Any artifact created here must align with and validate against related creators:
agent-creator for ownership and execution pathsskill-creator for capability packaging and assignmenttool-creator for executable automation surfaceshook-creator for enforcement and guardrailsrule-creator and semgrep-rule-creator for policy and static checkstemplate-creator for standardized scaffoldsworkflow-creator for orchestration and phase gatingcommand-creator for user/operator command UXBefore completion, verify all relevant handshakes:
.claude/CLAUDE.md and related routing docs.validate-integration.cjs passes for the created artifact.For new patterns, templates, or workflows, research is mandatory:
mcp__Exa__web_search_exa({ query: '<topic> 2025 best practices' })mcp__Exa__get_code_context_exa({ query: '<topic> implementation examples' })mcp__Exa__web_search_exa({ query: 'site:arxiv.org <topic> 2024 2025' })WebFetch({ url: 'https://arxiv.org/search/?query=<topic>&searchtype=all&start=0' })arXiv is mandatory (not fallback) when topic involves: AI agents, LLM evaluation, orchestration, memory/RAG, security, static analysis, or any emerging methodology.
tools
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
tools
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
data-ai
Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.
development
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.