lidge-jun/codexclaw / plugins/codexclaw/skills/dev
cxc-dev
VerifiedUse for coding, PR delivery, scaffolding and QA. Triggers: develop, fix, refactor, test, review, docs, browse, stacked PR, 개발, 수정, 검토, 스택 PR.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 12.0 KB |
| agents/openai.yaml | config | 143 B |
| references/async-questions.md | markdown | 6.2 KB |
| references/browser-routing.md | markdown | 3.4 KB |
| references/code-mode-examples.md | markdown | 4.3 KB |
| references/development-practice.md | markdown | 6.3 KB |
| references/hosted-ci-evidence.md | markdown | 3.2 KB |
| references/logging.md | markdown | 2.8 KB |
| references/methodology-overlays.md | markdown | 2.8 KB |
| references/native-execution.md | markdown | 6.3 KB |
| references/peer-collaboration.md | markdown | 10.6 KB |
| references/product/crud-product-development.md | markdown | 2.7 KB |
| references/reader-documents.md | markdown | 6.7 KB |
| references/skill-catalog.md | markdown | 14.1 KB |
| references/skill-ownership.md | markdown | 5.0 KB |
| references/stacked-prs.md | markdown | 16.0 KB |
| references/static-analysis-gate.md | markdown | 2.6 KB |
| references/static-analysis.md | markdown | 3.3 KB |
references/development-practice.md
View on GitHub# Development practice
## 0.5 Repository Convention Discovery
Before broad changes, inspect source layout, source-of-truth docs, agent instructions,
toolchain config, and sibling naming/test/module patterns. Devlogs use decade-range
numbering, never bare `PLAN.md`/`PHASES.md`/`RCA.md` (LEXICO-SPLIT-01; see `pabcd`).
Discover conventions in order: repo instructions/SoT docs → toolchain/config → owning
module → direct callers → 2-3 sibling examples.
MUST follow existing conventions when they are clear.
MUST read existing source-of-truth docs before broad implementation.
MUST NOT create docs folders, instruction files, or new tooling silently in an existing repo.
If the repo is immature, undocumented, or inconsistent, propose a lightweight source-of-truth structure and ask for approval before creating it.
### Broad Change Preview
For directory changes, 5+ files, cross-surface work, new modules/services, or new
project docs, preview current signals, a compact tree (max ~40 lines), planned
touch points, and whether existing conventions are reused or need approval.
---
## 1. Modular Development
Give every file, function, and class a single, clear responsibility.
**Review signals (DEFAULT — exceed with a stated responsibility/risk rationale):**
| Metric | Threshold | Action |
| ------ | --------- | ------ |
| File length | >400 lines | Split into focused modules (canonical owner: `dev-architecture` §1) |
| Function length | >50 lines | Extract helper functions |
| Class methods | >20 methods | Split by responsibility |
| Nesting depth | >4 levels | Flatten with early returns or extraction |
| Function parameters | >5 | Use an options/config object |
| PR changeset | >500 lines | Split into focused PRs |
### Blast Radius Limits
Each PR/changeset MUST be scoped to one logical change. Opportunistic rewrites, unrelated cleanup, and drive-by refactors go in separate PRs.
| Change Scope | Max Blast Radius | Exceeds → |
|---|---|---|
| Single bug fix | 1–3 files | Split fix from cleanup |
| Feature addition | 1 module/package | Separate infra from feature |
| Refactoring | Pre-approved scope only | Get scope approval first |
| Dependency upgrade | Isolated PR | Never bundle with features |
**Rules:**
- Prefer ESM for new JS/TS code when the runtime and repository support it. Preserve required CommonJS configuration/package interfaces; interop and bundler optimization are separate checks, not reasons for a blanket migration.
- One default export per file when the file has a primary purpose (JS/TS convention; other languages follow their idioms).
- Follow existing naming conventions in the project. Check sibling files before creating new ones.
- New files must match the directory structure and naming patterns already in use.
- Devlog phase documents use decade-range numbering (LEXICO-SPLIT-01, `pabcd` Implementation-Unit Documents). Never use bare filenames like `PLAN.md`, `PHASES.md`, or `RCA.md`.
---
## 1.5 Necessity Gate & Pre-Write Search Obligation
**DEV-NECESSITY-01 (DEFAULT — ponytail discipline, verified 2026-07-02):** before writing
ANY code, check the no-code options in order — do nothing / delete / configure / reuse —
and state which you rejected and why. Frame tasks exclusions-first (what NOT to add)
before the goal. Never lazy about STRICT domains: trust boundaries, data loss, security,
accessibility.
**Rule:** Before creating a new function, helper, type, component, constant, route, fixture, or module, search the codebase for an existing owner or equivalent implementation. No new abstraction may be introduced without search evidence. This section does not apply on the dev SKILL.md §0.1 fast path (C0/C1 — no new abstractions are being created).
**Structure map first (DEFAULT — DEV-MAP-FIRST-01):** for C2+ work in unfamiliar territory,
run `cxc map <dir>` (repo-map skill, tree-sitter + PageRank overview) before deep `rg`
dives; then use `rg`/ast-grep to confirm the narrowed targets. Guidance, not hook-enforced.
**Read before editing (DEV-READ-FIRST-01).** Beyond new-abstraction creation, any C2+ edit to
existing code reads the target file (and its direct caller/consumer when the change crosses a
boundary) before writing. Do not propose or apply a change to code you have not read. The dev SKILL.md §0.1
fast path still applies to C0/C1.
| Artifact being created | Required searches | Preferred outcome |
|---|---|---|
| Function/helper | Exact name, verb phrase, domain noun | Extend existing helper or add next to owner |
| Type/interface/schema | Exact type name and shape fields | Reuse or extend existing contract |
| Component | UI label, route, component name, feature folder | Modify owning component |
| Constant/magic string | Literal value and semantic name | Move to existing constants/contract module |
| Test fixture/factory | Fixture factory and existing test data | Extend shared fixture factory |
| Route/API client | Endpoint path, handler name, client wrapper | Update both server and client owner |
| Config/env flag | Env var prefix and config module | Add to central config owner |
**Banned patterns:**
- Creating `utils.ts`, `helpers.ts`, or `common.ts` without owner search
- Duplicating a type because import path was not obvious
- Creating parallel API clients for the same endpoint
- "I could not find it" without showing search terms
**Search evidence required:** When code is changed, include terms searched, files inspected, reuse decision, and new-code justification in the final response.
## 2. Systematic Debugging
Root-cause method, instrumentation, hypothesis testing, emergency stop triggers,
and postmortems are canonical in `dev-debugging/SKILL.md`. Reproduce and isolate
before editing for any non-obvious defect. Load `dev-debugging` for runtime failures,
unclear causality, or after 2 failed repair attempts.
**Repeated-friction rule (DEV-FRICTION-01, DEFAULT).** When the same shell command
class fails twice with the same normalized error, do not retry a third time
unchanged: switch approach (different tool, different flags, or root-cause the
environment). Repeated identical failures are friction evidence, not bad luck.
**Repeated-edit-shape rule (DEV-EDIT-SHAPE-01, DEFAULT).** Three same-shaped edits
in a row (same structural transform on different sites) mean you are hand-running
a codemod: stop and switch to `$cxc-ast-grep` (or a scripted rewrite) so the
remaining sites are transformed deterministically.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |