skills/best-practices/SKILL.md
Use when the user wants to ensure a task is done the RIGHT way — researching official docs, best practices, and codebase conventions BEFORE writing any code. Invoke this skill whenever the user says 'best practice', 'do it right', 'make sure this is correct', 'research first', 'what's the proper way', or when tackling unfamiliar libraries, complex integrations, migrations, or any task where getting it wrong would be costly. Also use when the user explicitly invokes /best-practices.
npx skillsauth add dakdevs/skills best-practicesInstall 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.
Research deeply, validate thoroughly, then execute with confidence.
The default instinct is to jump straight into implementation — write code, see if it works, fix what breaks. This skill enforces the opposite: understand the problem space fully, find the established best practice, confirm the approach, and only then write code that you know is correct.
<HARD-GATE> Do NOT write any implementation code, make any file changes, or take any implementation action until: 1. You have completed the Research Phase 2. You have presented your findings to the user 3. The user has approved the approachThis applies regardless of how simple the task appears. "Simple" tasks are where outdated assumptions cause the most damage. </HARD-GATE>
Your training data has a cutoff. Libraries release breaking changes. APIs get deprecated. Config formats evolve. The way you "know" how to do something may be 6-18 months out of date. The entire point of this skill is to verify against current reality before acting.
Phase 1: RESEARCH (mandatory)
├── Identify technologies and domains involved
├── Search official documentation (WebFetch/WebSearch)
├── Search codebase for existing patterns (Grep/Glob)
├── Search for known pitfalls and anti-patterns
├── Check version-specific considerations
└── Synthesize findings into an approach
▼ GATE: Present findings, get user approval
Phase 2: PLAN (mandatory)
├── Outline the specific changes to make
├── Identify files to create/modify
├── Note any dependencies or ordering constraints
└── Flag any risks or tradeoffs
▼ GATE: User confirms plan
Phase 3: EXECUTE
├── Implement following the researched approach
├── Verify against best practices checklist
└── Confirm result with user
This is the heart of the skill. Do not rush it. The time spent here saves multiples in debugging and rework.
Before searching anything, name what you're dealing with:
package.json, Cargo.toml, go.mod, etc.)For each technology involved, go to the source of truth:
Do NOT rely on your training data for API signatures, config options, or method names. They change frequently. Read the current docs.
Understand what already exists:
Targeted research for what goes wrong:
Combine everything into a clear approach. You should now be able to answer:
Present a concise summary to the user. Structure it like this:
## Research Summary
**Task:** [what we're doing]
**Technologies:** [lib@version, framework@version, ...]
### Best Practice Approach
[The recommended approach from official docs, 2-4 sentences]
### Codebase Conventions
[How this project already handles similar things, or "no existing patterns found"]
### Key Pitfalls to Avoid
- [pitfall 1]
- [pitfall 2]
### Proposed Approach
[Your specific plan, combining best practices with project conventions]
### Sources
- [doc URL 1]
- [doc URL 2]
Wait for user approval before proceeding.
After the user approves the research findings, outline the specific implementation:
This can be brief for simple tasks. Scale the detail to the complexity.
Wait for user confirmation before executing.
Now implement, following the researched approach exactly:
If you catch yourself thinking:
ALL of these mean: STOP. You're skipping research.
| Rationalization | Reality | |----------------|---------| | "It's just a one-liner" | One-liners with wrong API signatures cause hours of debugging | | "I've done this a hundred times" | Your training data is frozen. The library may have changed. | | "The user is in a hurry" | Researching for 2 minutes beats debugging for 20 | | "I'll verify after I write it" | Post-hoc verification is confirmation bias. Research first. | | "The docs won't have anything new" | Then research will be fast. Do it anyway. | | "This is too simple for a research phase" | Simple tasks with wrong assumptions waste the most time |
For tasks involving multiple technologies, spawn parallel research agents:
Agent 1: Research [technology A] best practices for [task]
Agent 2: Research [technology B] best practices for [task]
Agent 3: Search codebase for existing patterns
Synthesize all findings before presenting to user. This keeps research fast even for complex multi-tech tasks.
If official docs, community best practices, and codebase conventions disagree:
| Phase | What You Do | Gate | |-------|------------|------| | 1. Research | Docs, codebase, pitfalls, synthesis | Present summary, get approval | | 2. Plan | Files, order, risks, verification | User confirms | | 3. Execute | Implement, self-check, present result | User verifies |
development
Interact with open tldraw desktop canvases via a local HTTP API at localhost:7236. Create, read, update, and delete shapes. Take screenshots. Build diagrams, flowcharts, wireframes, and visual layouts programmatically. Use when the user asks to draw, diagram, sketch, wireframe, create a visual, modify a canvas, add shapes, create a flowchart, create an architecture diagram, or work with tldraw. Also triggers on "draw on canvas", "add to canvas", "update the diagram", "show me on the canvas", or any reference to tldraw files (.tldr).
tools
Create or update a draft pull request for the current branch using `gh` CLI. Triggers on "PR this", "create a PR", "open a PR", "make a PR", "submit PR". Idempotent - always re-assesses the full diff and either creates a new PR or updates the existing one. Creates draft PRs by default; say "do not draft" to create a ready-for-review PR instead.
development
Spin up a Claude agent team for implementation tasks. Use when user says "team go", "agent team go", "agent team", "/claude-agent-team", or wants a coordinated multi-agent approach to a feature or task.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.