backend-conventions
Skill4 starsChanged 7 months agoMITView on GitHub
CLI-specific conventions: npm registry interaction, filesystem operations, JSON handling, settings merge, and configuration patterns for worclaude
- Installs packages
6 other projects use a version of this.
Adopted by
Most recently taken up by
- jbouder/skillstheir own version, first seen Nov 1, 2026
- fpindej/netrocktheir own version, first seen Oct 8, 2026
- flntfnd/claude-skillstheir own version, first seen Aug 20, 2026
- ryokkon624/scrum-agent-basetheir own version, first seen Jul 9, 2026
- getsentry/sentrytheir own version, first seen Jun 30, 2026
- sefaertunc/anthropic-watchtheir own version, first seen Apr 30, 2026
Used with
Projects with it also use frontend-conventions.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CloudflareSkillfrontend-conventions
Use for creating, modifying, moving, or reviewing React frontend code anywhere in packages/*, including Workshop pages, gatekeeper management apps, shared UI, components, hooks, forms, interactions, styling, accessibility, and frontend tests.
Also in 3 projects that use this
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- getsentry/sentry★ 46ksame name
- fpindej/netrock★ 234same name
- jbouder/skills★ 1same name
- sefaertunc/anthropic-watch★ 1same name
- flntfnd/claude-skills★ 0same name
- ryokkon624/scrum-agent-base★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-routingSkill
- claude-md-maintenanceSkill
- coding-principlesSkill
- context-managementSkill
- coordinator-modeSkill
- frontend-design-systemSkill
- git-conventionsSkill
- memory-architectureSkill
- planning-with-filesSkill
- project-patternsSkill
- prompt-engineeringSkill
- review-and-handoffSkill
- security-checklistSkill
- subagent-usageSkill
- testingSkill
- verificationSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
All file operations use fs-extra (not raw fs):
- Very specific: line 18
Always path.join() — never concatenate with /
- Very specific: line 20
Use os.platform() for OS-specific behavior (notification commands)
- Very specific: line 35
No auth tokens. No environment variables.
- Distinctive: line 50
Never removes or replaces existing user rules
- Very specific: line 100
All errors surface through display.error() (Chalk-styled red output), never raw console.error.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLI & Data Conventions
worclaude is a CLI tool, not a backend service. This skill covers the patterns that serve a similar role to backend conventions: data access (filesystem), external service interaction (npm registry), configuration management, and data format handling (JSON).
Filesystem Access Patterns
All file operations use fs-extra (not raw fs):
fs.ensureDir()for creating directories (idempotent)fs.copy()for template-to-project file copyingfs.readJson()/fs.writeJson()for JSON filesfs.pathExists()for existence checks before operations
Cross-platform rules:
- Always
path.join()— never concatenate with/ - Normalize CRLF before hashing (
content.replace(/\r\n/g, '\n')) - Use
os.platform()for OS-specific behavior (notification commands)
File utilities live in src/utils/file.js: copyDirectory(), removeDirectory().
npm Registry Interaction
Single external dependency: https://registry.npmjs.org/worclaude
// Shared utility: src/utils/npm.js — getLatestNpmVersion()
// - 5-second timeout (AbortController)
// - Returns null on any error (offline, timeout, 404)
// - Used by: upgrade command (self-update check), status command (version display)No auth tokens. No environment variables. Plain HTTPS fetch. Graceful degradation — every caller handles null return.
JSON Handling
Settings builder flow
Read template JSON → JSON.parse() → merge objects → replaceHookCommands() → JSON.stringify()Critical: replaceHookCommands() operates on the parsed object's string values, not on the full JSON string. The formatter command and notification command are replaced inside individual hook command strings after parsing.
Settings merge (append-only)
mergeSettingsPermissionsAndHooks():
- Permissions: append new rules to existing array, deduplicate by string equality
- Hooks: append new hooks, check for matcher conflicts before adding
- Never removes or replaces existing user rules
parseUserJson() two-pass strategy
Pass 1: JSON.parse(raw) — handles well-formed JSON
Pass 2: JSON.parse(raw.replace(/\\{/g, '{').replace(/\\}/g, '}')) — handles zsh artifacts
Fail: throw Error('Could not parse JSON: clear message')Template variable substitution
Template files use {variable_name} placeholders (single braces). These are replaced in the parsed object, not in raw JSON strings. Variables: {project_name}, {description}, {tech_stack}, {formatter_command}, {notification_command}.
Configuration Management
workflow-meta.json
The project's state tracker. Created during init, updated during upgrade.
{
"version": "1.3.4",
"installedAt": "ISO timestamp",
"lastUpdated": "ISO timestamp",
"projectTypes": ["cli"],
"techStack": ["node"],
"useDocker": false,
"universalAgents": ["plan-reviewer", ...],
"optionalAgents": ["bug-fixer", ...],
"fileHashes": { "agents/plan-reviewer.md": "sha256", ... }
}Hash computation: SHA-256 of CRLF-normalized file content. Used by upgrade and diff commands to detect which files the user has customized vs which are unchanged from install.
useDocker field: Added for settings rebuild during upgrade — determines whether docker.json permissions are included.
Scenario detection (detector.js)
No .claude/ AND no CLAUDE.md → Scenario A (fresh)
.claude/ OR CLAUDE.md exists, but no .claude/workflow-meta.json → Scenario B (existing)
.claude/workflow-meta.json exists → Scenario C (upgrade)Error Handling
CLI-specific error patterns:
- Malformed user JSON:
parseUserJson()throws with clear message naming the file - npm registry errors: return
null, caller shows "(offline)" or skips version check - EACCES on npm install: catch specifically, suggest
sudo npm install -g worclaude - Corrupted settings.json: detected during Scenario B merge, shown as clear error, doesn't crash
All errors surface through display.error() (Chalk-styled red output), never raw console.error.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

