config/ai/claude/claudecode/skills/code-writer/SKILL.md
Use when writing or modifying code in any programming language. Apply when adding functions, fixing bugs, or implementing features.
npx skillsauth add pixelastic/oroshi code-writerInstall 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.
Code should communicate intent clearly. Excessive comments and output statements create noise that obscures logic.
Core principle: Minimize noise, maximize signal. Comments explain why, not what. Output statements serve a purpose, not narration.
These guidelines apply to all programming languages. For language-specific patterns and conventions, use the appropriate language-specific skill:
js-writer skill for JavaScript/Node.js codezsh-writer skill for ZSH functions in .oroshi repositoryLanguage-specific skills extend these core guidelines with syntax and idioms specific to that language.
When NOT to use:
Output statements include: console.log(), print(), echo, printf(), puts, System.out.println(), etc.
Allowed ONLY for:
FORBIDDEN:
"Processing...", "Starting...", "Done")"Found X items", "Total: Y")console.log(""))"===== Summary =====")"checkpoint 1", "here")// ✅ Display function - output IS the purpose
function listBranches(branches) {
branches.forEach(b => console.log(b.name));
}
// ✅ Error to stderr
if (!filePath) {
console.error("Error: File path required");
return null;
}
// ❌ FORBIDDEN - Progress narration
console.log("Starting analysis...");
const results = compute(data);
console.log(`Found ${results.length} items`);
If unsure whether to add output: DON'T.
Allowed:
FORBIDDEN:
// Process each item)// color1 #ef4444 when RGB already in code)// from palette index 5)// Additional colors)// ✅ Explains semantic meaning
#define BLACK ((Color){0, 0, 0}) // Off/disabled
// ❌ FORBIDDEN - Redundant format conversion
#define RED ((Color){239, 68, 68}) // #ef4444
// ❌ FORBIDDEN - Per-line metadata
#define PURPLE ((Color){128, 90, 213}) // color5 from kitty
// ❌ FORBIDDEN - Obvious section header
// Additional color definitions
#define CYAN ((Color){8, 145, 178})
// ✅ Function documentation
/**
* Retry operation up to maxAttempts times
* @param {Function} operation - Async function to retry
* @returns {Promise} Result of operation
*/
async function retryOperation(operation, maxAttempts) {
// ...
}
// ✅ ONE section comment for 3+ validations
// Validate required config fields
if (!config.apiKey) throw new Error("Missing apiKey");
if (!config.endpoint) throw new Error("Missing endpoint");
if (!config.timeout) throw new Error("Missing timeout");
// ✅ Data meaning
// First line contains headers
if (lineNumber === 0) {
return parseHeaders(line);
}
// ❌ FORBIDDEN - Explains what code does
// Check if file exists
if (!fs.existsSync(filePath)) {
return null;
}
// ❌ FORBIDDEN - Loop comment
// Loop through users
for (const user of users) {
processUser(user);
}
When editing existing code: Never remove existing comments.
If unsure whether to add comment: DON'T.
| Category | Default | Allowed | Forbidden | |----------|---------|---------|-----------| | Output | Zero | Display functions, errors to stderr | Progress, status, decorative headers | | Comments | Function docs only | Section (3+ ops), data meaning | What code does, per-line, format conversions |
| Mistake | Why Wrong | Fix | |---------|-----------|-----| | Per-line comments | Visual noise, obvious from code | Remove, use descriptive names | | Format conversion comments | Redundant data in different format | Remove, keep one format | | Progress messages | Narrates obvious execution | Remove or use logging framework | | Section headers stating obvious | Spatial grouping already clear | Remove | | Breadcrumb comments | Documents debugging journey | Remove after fixing |
Before:
// Additional colors from kitty palette
#define RED ((Color){239, 68, 68}) // color1 #ef4444
#define PURPLE ((Color){128, 90, 213}) // color5 #805ad5
#define CYAN ((Color){8, 145, 178}) // color6 #0891b2
After:
#define RED ((Color){239, 68, 68})
#define PURPLE ((Color){128, 90, 213})
#define CYAN ((Color){8, 145, 178})
Clean code: 60% less noise, same information, better readability.
tools
Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.
tools
Break a plan, spec, or PRD into independently-grabbable issues using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.
documentation
Use when user says "sidequest" or "handoff" — compact conversation context into a document for a fresh agent to pick up.
development
Use when the user wants to nail down domain terms, resolve terminology ambiguities, or build a shared language for a module or repo. Drills vocabulary one question at a time and writes to the project GLOSSARY.md.