skill-optimization
Optimization patterns and grading system for skill quality assessment. Automatically loaded when creating new skills, evaluating skill quality, reviewing skill content, or when "skill optimization", "skill quality", "BP pattern", "skill grading", or "skill assessment" are mentioned.
What this skill does
# Skill Optimization
## BP Patterns (Best Practice Patterns)
### P1 Critical — Must fix before skill is usable
**BP-1: Negative-to-Positive Rewriting**
Convert prohibitions into actionable instructions. Agents follow positive directives more reliably than avoiding negatives.
```
BAD: "Don't use any in TypeScript"
GOOD: "Use explicit types: unknown for external data, generics for reusable code, union types for variants"
```
**BP-2: Vague-to-Specific Conversion**
Replace ambiguous guidance with measurable criteria.
```
BAD: "Write clean functions"
GOOD: "Function length: <50 lines ideal, <200 max. Single return type. Max 3 parameters (use options object beyond 3)."
```
**BP-3: Missing Output Format Specification**
Every skill used by an agent that produces structured output MUST define the expected format.
```
BAD: "Report the findings"
GOOD: "Output JSON: { status, findings: [{category, severity, location, remediation}], summary }"
```
### P2 High — Should fix for production-quality skills
**BP-4: Unstructured-to-Organized**
Content should flow from general principles to specific patterns. Use consistent heading hierarchy.
```
BAD: Mixed tips, rules, and examples in random order
GOOD: Principle → When to apply → Pattern → Example → Anti-pattern
```
**BP-5: Missing Context Provision**
State when and why a rule applies, not just what the rule is.
```
BAD: "Use Result type for error handling"
GOOD: "Use Result type when: crossing service boundaries, parsing external input, operations with expected failure modes. Skip for: internal logic with guaranteed preconditions."
```
**BP-6: Complex-to-Decomposed**
Break complex multi-part rules into discrete, independently applicable items.
```
BAD: "Handle errors properly with logging, user notification, and recovery"
GOOD: Three separate sections: "Error Logging" (what/when/format), "User Notification" (messages/severity), "Error Recovery" (retry/fallback/escalation)
```
### P3 Enhancement — Nice to have for polish
**BP-7: Biased Examples**
Provide examples that cover both success and failure paths, not just happy paths.
```
BAD: Only showing successful validation
GOOD: Show validation success AND common validation failure scenarios
```
**BP-8: Missing Escalation Criteria**
Define when the agent should stop and escalate to the user instead of continuing.
```
BAD: No mention of edge cases or uncertainty handling
GOOD: "Escalate when: security implications unclear, performance impact >10%, breaking change to public API"
```
## Editing Principles
For detailed editing principles (context efficiency, deduplication, grouping, measurability, positive form, consistent notation, explicit prerequisites, priority ordering, scope boundaries), reference **rule-editing-guide** skill.
### Skill-Specific Applications
1. **Context Efficiency**: Skill SKILL.md should be self-contained within its scope. Reference other skills by name, never duplicate content.
2. **Deduplication**: If content overlaps with another skill, reference it: "See [skill-name] skill '[section]' for details."
3. **Measurability**: Every criterion should be checkable — "Is this rule followed? Yes/No" must be answerable from the code.
4. **Scope Boundaries**: First paragraph of skill MUST state what is in scope and what is not.
5. **Expert References**: Every skill should end with "Expert References (Reasoning Calibration)" table for decision grounding.
## Grading System
### A Grade — Production Ready
- All P1 patterns (BP-1, BP-2, BP-3) resolved
- 80%+ of P2 patterns (BP-4, BP-5, BP-6) addressed
- Output format clearly specified
- Expert References section present
- No ambiguous or unmeasurable criteria
### B Grade — Usable with Gaps
- All P1 patterns resolved
- Some P2 gaps remain (1-2 unaddressed)
- Core content is clear and actionable
- Minor structural improvements possible
### C Grade — Requires Revision
- P1 patterns remaining (negative rules, vague criteria, or missing output format)
- Significant restructuring needed
- Cannot be reliably used by agents in current state
## Assessment Checklist
When evaluating a skill, check each item:
### Structure
- [ ] Frontmatter has name and description with auto-load triggers
- [ ] Description includes "Automatically loaded when..." clause
- [ ] Content flows general → specific
- [ ] Consistent heading hierarchy (H2 for sections, H3 for subsections)
- [ ] Scope clearly stated in opening paragraph
### Content Quality
- [ ] No negative-only rules (BP-1)
- [ ] All criteria are specific and measurable (BP-2)
- [ ] Output format defined if agent produces structured output (BP-3)
- [ ] Organized by topic, not chronologically (BP-4)
- [ ] Context provided for when/why rules apply (BP-5)
- [ ] Complex rules decomposed into discrete items (BP-6)
### Completeness
- [ ] Both success and failure examples included (BP-7)
- [ ] Escalation criteria defined (BP-8)
- [ ] Expert References table present
- [ ] No content duplicated from other skills
### Integration
- [ ] Referenced in skills-index.yaml with accurate tags
- [ ] Tags cover all relevant search terms
- [ ] key_sections list matches actual H2 headings
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.