Skilllibrary implementer-node-agent
install
source · Clone the upstream repo
git clone https://github.com/merceralex397-collab/skilllibrary
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/merceralex397-collab/skilllibrary "$T" && mkdir -p ~/.claude/skills && cp -r "$T/06-agent-role-candidates/implementer-node-agent" ~/.claude/skills/merceralex397-collab-skilllibrary-implementer-node-agent && rm -rf "$T"
manifest:
06-agent-role-candidates/implementer-node-agent/SKILL.mdsource content
Purpose
Writes and modifies JavaScript and TypeScript code in a single file or tightly-coupled file pair (source + test), following the project's existing conventions for module format, linting, typing, and test patterns.
When to use
- A plan or ticket requires creating or modifying a
,.js
,.ts
, or.jsx
file..tsx - A bug fix or feature addition targets a specific Node.js/TypeScript module.
- A test file needs to be created or updated alongside a source file.
- A package.json script, dependency, or configuration needs modification.
Do NOT use when
- The change spans 3+ files across different modules — use
for coordination.implementer-hub - The target language is Python, Rust, Go, or another non-JS/TS language.
- The task is gathering context, not writing code — use
.implementer-context - The task is running or evaluating tests — use
.qa-validation
Operating procedure
- Read the context bundle (from
) or the ticket description to identify: target file path, required changes, and acceptance criteria.implementer-context - Run
to detect TypeScript mode. Record: strict mode (true/false), target (ES2020, ESNext, etc.), module format (ESM/CJS), and path aliases.cat tsconfig.json 2>/dev/null || echo "no tsconfig" - Run
to determine if the project usescat package.json | grep -A5 '"type"'
(ESM) or defaults to CJS. Record the module format."type": "module" - Run
to extract lint and format rules: quote style, semicolons, indent width, trailing commas.cat .eslintrc* .prettierrc* biome.json 2>/dev/null | head -40 - If the target file exists, read it fully. Identify: existing imports, exported symbols, function signatures, and inline types or interfaces.
- If the target file does not exist, examine 2 sibling files in the same directory to extract the file template pattern: header comments, import ordering, export style.
- Write the implementation following these conventions exactly: match the import style (named vs default, path aliases vs relative), match the export style, preserve the existing indentation and formatting.
- If a test file is required, locate the corresponding test directory or co-located test pattern. Run
in the target directory. Create the test file using the same runner (jest, vitest, mocha, node:test) and assertion style found in existing tests.ls *test* *spec* __tests__/ 2>/dev/null - Run the project linter on the changed file:
to auto-fix formatting issues.npx eslint <file> --fix 2>/dev/null || npx biome check <file> --fix 2>/dev/null - Run the specific test file:
. Record pass/fail.npx jest <test-file> 2>/dev/null || npx vitest run <test-file> 2>/dev/null || node --test <test-file> 2>/dev/null - If tests fail, read the error output, identify the root cause, fix the code, and re-run. Repeat up to 3 times.
- Run
to confirm only the expected files were modified.git --no-pager diff --stat
Decision rules
- If the project uses ESM (
or"type": "module"
), never use.mjs
— always userequire()
.import - If
hastsconfig.json
, ensure all variables have explicit types and no"strict": true
is introduced.any - If the project has path aliases (e.g.,
), use them instead of relative paths that traverse >2 levels.@/utils - If no test runner is detected, write tests using Node.js built-in
andnode:test
.node:assert - If a dependency is needed that is not in package.json, add it with
before importing it.npm install <pkg> - Never modify files outside the scope specified in the ticket or plan.
Output requirements
- Files Changed — list of created or modified files with a one-line summary of each change.
- Convention Compliance — confirmation that the implementation matches: module format, lint rules, type strictness, and naming conventions.
- Test Results — test file path, pass/fail count, and any error output from failures.
- Dependency Changes — any packages added or removed, with justification.
- Code Diff — the full
output for review.git diff
References
- Node.js ESM documentation: https://nodejs.org/api/esm.html
- TypeScript strict mode: https://www.typescriptlang.org/tsconfig#strict
- Project-local tsconfig.json, package.json, and linter configs
Related skills
— provides the context bundle this skill consumesimplementer-context
— dispatches work to this skill for multi-file changesimplementer-hub
— produces the tickets and plans this skill implementsplanner
— validates the output of this skill against acceptance criteriaqa-validation
Failure handling
- If the linter produces errors that
cannot resolve, list the remaining errors and apply manual fixes following the reported rule names.--fix - If the test runner is unrecognized, fall back to
withnode --test
.node:assert/strict - If TypeScript compilation fails, run
to get the exact error and fix type mismatches.npx tsc --noEmit <file> - If the target file has merge conflict markers (
), resolve the conflict before making any changes and flag this in the output.<<<<<<< - If the implementation requires breaking a public API, document the breaking change and suggest a migration path.