원클릭으로
js-writer
Use when writing or modifying JavaScript code. Apply when adding functions, fixing bugs, or implementing features.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when writing or modifying JavaScript code. Apply when adding functions, fixing bugs, or implementing features.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when writing or modifying ZSH functions.
Use when user says "ralph <dir>" or "ralph this". Implements the highest-priority issue from state.json in the given directory using TDD, updates docs, runs review in a subagent, fixes actionable feedback, then stops for user to commit. Argument is the directory containing state.json and GUIDANCE.md.
Use when user says "sidequest". Compact conversation context into a document for a fresh agent to pick up.
Use when writing or modifying Python code. Apply when adding functions, fixing bugs, or implementing features.
Use when creating or updating skills.
Use when user says "phone pickup", "pick up the conversation from the phone", "récupère la discussion du téléphone", or wants to retrieve a mobile vocal session saved in Notion.
| name | js-writer |
| description | Use when writing or modifying JavaScript code. Apply when adding functions, fixing bugs, or implementing features. |
Write JavaScript code consistent with my conventions.
Use my preferred libraries — the references explain when and why:
_ (lodash), pMap, dayjs, yoctocolors, pProps, and moreGoal: Correct path and name.
Exit criterion: File exists at correct path with correct name.
lib/main.js as the single top-level entry point for public moduleslib/myFunction.js)index.js barrel re-exporting them__tests__ folder, sibling of the file it's testinglib/
pull/
__tests__/
fetch.js
merge.js
fetch.js
index.js ← barrel: re-exports fetch and merge
merge.js
__tests__/
listEntries.js
listEntries.js
main.js ← single top-level entry point
Goal: Ensure the bug/feature has a failing test first
Exit criterion: Test fails.
Write a failing test for the bug or missing feature you want to implement.
yarn run test <filepath> to run the testsit.each when testing similar behavior with different inputstry/catch and let actual to test errorsit.each([
{
title: "Default path",
filepath: '/tmp/a',
options: {},
expected: 'a'
},
{
title: "Forced path",
filepath: '/tmp/b',
options: {
force: true
},
expected: 'b'
},
])('$title', async ({ filepath, options, expected }) => {
const actual = await myFn(filepath, options);
expect(actual).toEqual(expected);
});
Goal: Write the minimal code to make the failing test pass.
Exit criterion: Test is green.
Write the simplest code that makes the test pass. No patterns yet — just correct behavior.
yarn run test <filepath> to run the testsGoal: Apply structural and style patterns without changing behavior.
Exit criterion: Tests still pass after refactor.
| Pattern | Rule |
|---|---|
| Modules | ES6 import/export; named exports; .js extension; __ for private methods |
| Style | async/await; camelCase; minimal try/catch; lodash chains for 2+ ops; JSDoc on all fns |
| firost | File I/O and system operations |
| golgoth | Data transformation, dates, async utilities |
| aberlaas | Lint, test, release, etc |
import { formatEntry } from './formatEntry.js';
import { read, glob } from 'firost';
import { _ } from 'golgoth';
export let __;
/**
* List all entries in a directory, formatted
* @param {string} dirPath - Directory to scan
* @returns {string[]} Formatted entry names
*/
export async function listEntries(dirPath) {
const files = await __.findFiles(dirPath);
return _.chain(files)
.map((f) => formatEntry(f))
.compact()
.value();
}
__ = {
/**
* @param {string} dir
* @returns {string[]} Matching file paths
*/
findFiles(dir) {
return glob(`${dir}/**/*.js`);
},
};
Goal: Ensure code follows best practices.
Exit criterion: Lint passes.
Write code that passes automated lint.
yarn run lint:fix to automatically fix common issues and see remaining ones| Rationalization | Reality |
|---|---|
| "These comments are clutter, I'll clean them up" | Never remove existing comments |
| "mockResolvedValue is more idiomatic Vitest" | Always mockReturnValue(value) — abstract away sync/async |
| "expect().rejects.toThrow() is cleaner" | Use let actual = null + try/catch pattern |
index.js barrel re-exporting all functionsmain.js used only as top-level package entry point, not as a barrel__tests__/ use plain module name (e.g. fetch.js), no .test. or .spec. suffixfor loop; _.each/_.map/pMap used instead.js extension on local imports__)yarn run lint:fix run after changes