code-structure
Skill0 starsChanged 5 months agoMITView on GitHub
Use when multiple workflows duplicate the same operational logic, when deciding what belongs in actions vs shared services, or when refactoring repeated operational blocks across domain flows. Use when adding new features that share mechanics with existing ones.
8 other projects use a version of this, 6 of them edited.
Adopted by
Most recently taken up by
- imornar/skillsedited, first seen Sep 17, 2026
- rikvanriel/code-hygienetheir own version, first seen Sep 17, 2026
- Nagacash/nagacodex-factory-skilledited, first seen Sep 15, 2026
- michaelshimeles/skillsedited, first seen Sep 4, 2026
- voundbrand/overnightedited, first seen Sep 3, 2026
- Spardutti/claude-skillstheir own version, first seen Aug 31, 2026
Used with
Projects with it also use evidence-driven-testing, greploop-apps and 3 more.
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.
kellykampenSkillevidence-driven-testing
Records visual proof while testing UI behavior — screen recording with structured test/assertion annotations — then posts the video and a results summary to the PR and tracker issue. Use whenever a UI change needs verifiable evidence that it works, instead of prose claims.
Also in 4 projects that use this
michaelshimelesSkillgreploop-apps
Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments. Identical to greploop, but triggers reviews by tagging @greptile-apps, which bypasses Greptile's file-count limit on huge PRs that the plain @greptile mention refuses to review. Use when the user wants to fully optimize a large PR/MR/CL against Greptile's code review standards.
Also in 3 projects that use this
VercelSkillbefore-and-after
Add existing screenshots or screen recordings to a GitHub pull request as a before/after or preview block. Use when a PR needs visual media attached to its description. Browser navigation and capture belong to agent-browser.
Also in 3 projects that use this
undeadlistSkillnew-feature
Develop new features with test-first approach (TDD)
Also in 3 projects that use this
MicrosoftSkillunslop
Cut AI tells from any writing. Must always apply.
Also in 3 projects that use this
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 6
- michaelshimeles/skills★ 1.2k100% same
- kellykampen/agent-skills★ 2100% same
- nitikeshq/skills★ 220% same
- voundbrand/overnight★ 298% same
- Nagacash/nagacodex-factory-skill★ 1100% same
- imornar/skills★ 0100% same
Wrote their own version · 2
- Spardutti/claude-skills★ 3same name
- rikvanriel/code-hygiene★ 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 repository40 other files it gives its agents.
- address-pr-feedbackSkill
- architectureSkill
- code-reviewSkill
- competitive-briefSkill
- contract-guardSkill
- debugSkill
- deep-workSkill
- dependency-upgradeSkill
- deploy-checklistSkill
- diagnoseSkill
- documentationSkill
- explain-pr-step-by-stepSkill
- feedback-checkpointSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- improve-codebase-architectureSkill
- incident-responseSkill
- memory-managementSkill
- observabilitySkill
- plan-criticSkill
- plan-from-rfcSkill
- pr-babysitterSkill
- prototypeSkill
- queue-checkSkill
- rebase-onto-mainSkill
- releaseSkill
- security-reviewSkill
- setup-engineering-skillsSkill
- squash-and-pushSkill
- synthesize-researchSkill
- system-designSkill
- tddSkill
- tech-debtSkill
- testing-strategySkill
- to-issuesSkill
- to-prdSkill
- triageSkill
- verification-before-completionSkill
- zoom-outSkill
The file
We split this skill into the rules it gives an agent
5 rules. 5 are common, 0 are distinctive, and 0 are very specific to this project.
5
Common
Most of the 8 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 66
Never reach into database/state directly
- Common: line 73
When extracting shared logic:
- Common: line 75
Write the flow in action code first (clear behavior)
- Common: line 79
Keep domain policy in actions (auth, status transitions, error classification)
- Common: line 80
Run verification: typecheck, lint, confirm all flows still work
“Common” is measured: kept by at least 6 in 10 of the 8 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
Service Layer Architecture
Overview
Two-layer separation: Actions orchestrate domain rules (the "why/when"), while a service layer centralizes reusable operational mechanics (the "how").
This prevents duplicated code, inconsistent behavior, and bugs fixed in one path but not others.
When to Use
- Multiple callers need the same low-level operation (sandbox creation, email sending, payment processing)
- You're copy-pasting operational logic between action files
- A bug fix in one workflow doesn't propagate to others doing the same thing
- Adding a new feature that shares mechanics with existing flows
Don't use when: Logic is truly domain-specific and used by only one caller.
Core Pattern
Orchestration Layer (Actions) Service Layer (Shared Mechanics)
├── owns business rules ├── owns reusable operations
├── owns state transitions ├── owns provider/SDK interactions
├── owns auth/ownership checks ├── owns command execution details
├── owns failure classification ├── owns health checks / readiness
├── owns retries / user-facing errors └── returns structured results
└── calls service functionsRule of thumb:
- "What this product flow means" → keep in actions
- "How to do this operation reliably" → move to service layer
Quick Reference
| Design Principle | Do | Don't |
| API shape | Composable capability blocks | One giant "do everything" method |
| Inputs/outputs | Explicit params, structured returns | Hidden global state, reaching into DB |
| Migration | Extract one block, replace one caller, verify, then migrate rest | Refactor everything at once |
| Domain logic | Keep auth, policy, error classification in actions | Let service mutate domain state directly |
| Extraction trigger | Logic repeated across 2+ callers | Logic used once (over-abstraction) |
Designing Service Functions
Design as capability blocks, not monoliths:
// Good: composable, each caller chooses what to use
createManagedSandbox(...)
prepareRepo(...)
detectPackageManager(...)
installDependencies(...)
runBuildCommand(...)
startSandboxRuntime(...)Each function should:
- Accept all required data as explicit parameters
- Return structured outputs (e.g.,
{ ready, previewUrl, proxyPort }) - Never reach into database/state directly
- Make failure explicit (structured results, not swallowed errors)
This lets callers choose strict vs relaxed behavior per flow.
Migration Checklist
When extracting shared logic:
- Write the flow in action code first (clear behavior)
- Mark repeated operational chunks across callers
- Extract only repeated, non-domain chunks to service
- Replace one caller → verify → replace remaining callers
- Keep domain policy in actions (auth, status transitions, error classification)
- Run verification: typecheck, lint, confirm all flows still work
Anti-Patterns
| Anti-Pattern | Problem |
| God service | One huge function hides all control flow |
| Leaky service | Service mutates database tables directly |
| Inconsistent API | Each function uses different argument styles and error semantics |
| Over-abstraction | Extracting logic used by only one caller |
Example: Email Service (Simple)
// emailService.ts — shared mechanics
export async function sendWelcomeEmail(params: { to: string; name: string }) {
const html = `<h1>Welcome ${params.name}</h1>`;
await emailProvider.send(params.to, "Welcome", html);
}
// userSignup.ts — orchestration (owns WHEN to send)
if (user.marketingOptIn) {
await sendWelcomeEmail({ to: user.email, name: user.name });
}
// adminInvite.ts — orchestration (different business rule, same mechanic)
await sendWelcomeEmail({ to: invitee.email, name: invitee.name });Mental Model
New feature? → Write in action first → See repeated ops? → Extract to service
→ No repetition? → Keep in actionYour architecture in one sentence: Actions orchestrate domain rules, while the service layer centralizes reusable operational mechanics with a composable, explicit-input API.
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.

