skills/agent-best-practices/SKILL.md
Field-tested engineering principles. Apply when writing, modifying, or reviewing code. Emphasizes verification over assumption, scope discipline, root cause analysis, staying current, and automation. These principles are distilled from real project experience and hundreds of debugging sessions.
npx skillsauth add sceiler/skills agent-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.
Field-tested principles from a decade of software development, IT consulting, and web development. These rules are distilled from real project experience, hundreds of debugging sessions, and patterns observed across 167+ chat histories with AI coding assistants.
Never assume. Always verify.
Code that hasn't been tested is broken code you haven't discovered yet. A fix you haven't verified isn't a fix—it's a hypothesis.
verify-never-assumeNever say "fixed" without running verification.
Don't claim something works until you've proven it. Run the build, run the tests, visually check the output.
build and test commandsverify-all-environmentsSolutions must work everywhere, not just locally.
"Works on my machine" is not sufficient. Consider:
verify-test-after-changesAlways run tests after making changes.
Never assume your change is safe. Run the existing test suite to catch regressions. If tests don't exist, this is a signal to write them.
verify-manual-checkAutomated tests are not enough.
Tests catch regressions, but you must also verify actual behavior matches intent. Run the code, check the output, confirm it does what was requested.
verify-build-succeedsA passing test suite means nothing if the project doesn't build.
Always run the build command before considering work complete. TypeScript errors, lint errors, and build failures must be resolved. Zero tolerance for lint/TypeScript errors.
scope-respect-keywords"Just", "only", "simple" = minimum viable change ONLY.
When you see these keywords, limit yourself to the EXACT request:
| Keyword | Required Response | |---------|-------------------| | "just", "only", "simple", "don't add" | Limit to EXACT request, no extras | | "check", "verify", "test" | MUST execute verification and report results | | "carefully", "thoroughly" | Extra testing, full verification | | "again", "still", same issue repeated | Stop guessing, do root-cause analysis |
Example: User says "just add schema SEO breadcrumbs" → do NOT propose full visual breadcrumb UI components.
scope-no-extrasDo NOT add improvements, refactoring, or "nice to haves".
If something seems like it should be done, mention it as a suggestion but don't implement unless asked.
scope-suggest-dont-implementIf you see potential improvements, mention them—don't do them.
Your job is to complete the requested task. Additional improvements should be proposed for the user to approve, not silently implemented.
root-cause-stop-guessingIf the same issue appears twice, STOP making surface-level fixes.
When a fix doesn't work:
Real example: Mobile menu focus state persisting after close took 4 messages to fix because surface-level fixes didn't address the real problem.
root-cause-trace-originFind where the problem actually starts.
Issues often manifest far from their source:
root-cause-investigate-implausibleWhen values seem implausible, investigate the source data first.
Don't trust outputs that don't make sense. If a dashboard shows 916 views for a day but individual blog posts show far fewer, something is wrong with the data model (cumulative vs. daily totals), not the display.
root-cause-data-assumptionsExplicitly state data model assumptions before writing aggregation code.
Cumulative vs. incremental metrics must be explicitly clarified upfront. Verify calculations with real sample data before declaring completion.
regression-consider-side-effectsBefore any change, consider what else might be affected.
Changes cascade. Before editing:
Real examples of regressions:
regression-run-full-suiteRun the full test suite, not just tests for the changed code.
Your change might break something unrelated. The test suite exists to catch this.
regression-mention-verification-areasExplicitly mention what areas might need manual verification after changes.
When completing a task, list the areas that could be affected and should be checked.
clarify-ask-before-actingWhen request is ambiguous, ASK before acting.
Good clarifying questions:
Real example: Biography tone—user wanted "blend of personal and professional" but agent assumed "personal" only.
clarify-especially-forAlways clarify for: design decisions, scope boundaries, and user preferences.
Never assume:
current-update-dependenciesReject "never change a running system" mentality.
Keeping dependencies updated provides:
Outdated dependencies accumulate technical debt that compounds over time. Automate minor/patch updates; reserve major versions for manual review.
current-check-versionsAlways check versions before implementing features.
Framework APIs change between versions:
package.json for installed versions<head>, use generateMetadata insteadcurrent-leverage-framework-updatesFramework and tooling updates often yield significant wins without code changes.
Real example: Upgrading Next.js 15 → 16 yielded 24-second build time reduction (82s → 58s) without code changes. Infrastructure improvements are leverage.
simple-content-over-flashFocus on content over flashy features.
Minimal, clean design eliminates distractions. Readers should concentrate on substance rather than visual embellishment.
simple-measure-everything"What gets measured gets improved."
Use performance monitoring tools:
Track changes systematically to identify what delivers real impact versus marginal gains.
simple-hardware-over-clever-codeSlow machines are a tax you pay every day.
Sometimes throwing money at the problem (faster CI machines, better hardware) is the correct and cheapest solution long-term. Don't over-optimize code when infrastructure upgrades solve the problem.
simple-infrastructure-first"Almost all meaningful build time improvements came from upgrading software and using faster hardware, not from changing application code."
Try framework upgrades, tooling updates, and hardware improvements before complex code optimization.
quality-fewer-high-valueFewer, thoroughly researched, high-value outputs surpass frequent low-quality ones.
Each piece of work should genuinely serve its purpose. Don't rush to produce more; focus on producing better.
quality-accessibleAccessibility is mandatory, not optional.
Follow WCAG guidelines to ensure usability across all ability levels and devices.
quality-syntactically-validEvery code suggestion must be syntactically valid and complete.
workflow-branch-alwaysNever commit directly to main.
Create a new branch BEFORE writing ANY code. Use descriptive names: feature/add-search, fix/header-alignment, refactor/api-utils. Committing directly to main is forbidden unless explicitly permitted.
workflow-test-before-commitRun tests BEFORE every commit.
NEVER assume code works. Prove it. Run unit tests, then commit.
workflow-commit-incrementallyCommit after EACH completed task, not in batches.
Small, atomic commits create clean git history and make reverting easier. Make a local commit immediately after completing each todo item.
workflow-pr-when-doneCreate a Pull Request when work is complete.
After pushing, automatically create a PR. PRs enable review, discussion, and CI verification before merging.
workflow-automate-repetitiveAutomate tedious routine tasks.
If you do something manually more than a few times, it should be scripted or automated:
Reduced friction encourages regular maintenance.
compat-preserve-linksPreserve existing canonical links.
When restructuring URLs or identifiers:
compat-plan-for-duplicatesNever assume uniqueness of metadata.
When generating identifiers from content (slugs, IDs):
security-no-secrets-in-codeNever commit secrets or credentials.
API keys, passwords, tokens—none of these belong in code. Use environment variables or secret management systems.
security-validate-inputValidate all external input.
Never trust data from users, APIs, files, or environment variables. Validate before using.
security-block-at-edgeImplement defensive rules at infrastructure level, not just application level.
Block malicious requests (probing for PHP vulnerabilities, DDoS) at the edge/firewall before they reach your application. Zero-trust for unexpected protocols—if your app is Next.js, any .php request is automatically suspicious.
ai-claude-md-is-essentialCreate a project-specific instruction file (CLAUDE.md) that the agent reads at every session.
Include:
This consistency creates predictable output.
ai-outcome-over-specificationDescribe what needs to happen, not every implementation detail.
Your role becomes strategic direction-setting, not micro-management. AI amplifies whatever level of understanding you bring to the table.
ai-you-remain-architectArchitecture choices need human input.
When multiple valid approaches exist, the agent proposes solutions but needs steering toward your preferred direction. You provide the strategic decisions.
ai-leverage-external-knowledgeConnect to live documentation sources rather than relying on potentially outdated training data.
Use MCP servers for current platform information. Domain-specific knowledge (like optimization patterns from real codebases) compounds results better than generic advice.
ai-embrace-iterationComplex features take multiple commits to perfect.
AI maintains context, remembers previous attempts, and builds progressively. Tests enable confident iteration by creating a growing safety net.
Before completing any task:
| User Says | Your Response | |-----------|---------------| | "just", "only", "simple", "don't add/change" | Minimum viable change ONLY | | "check", "verify", "test", "double-check" | MUST execute verification and report results | | "carefully", "thoroughly", "be careful" | Extra testing, full verification before completion | | "again", "still", same issue repeated | Stop guessing, do root-cause analysis | | "try again" | Previous approach failed, need different strategy |
These principles are distilled from real experience—not theory:
These aren't theoretical guidelines—they're lessons learned from hundreds of debugging sessions, regressions, and fixes that didn't actually fix anything until properly verified.
development
Review and finish the current branch. Use when the user wants the agent to inspect the branch diff, fix code review, lint, typecheck, test, documentation, and PR gaps, then commit, push, and create or update the PR.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------