scaffold-core-module
Skill0 starsChanged 3 months agoMITView on GitHub
Add or modify a portable module under src/core/ in @finografic CLI projects — folder layout, barrel exports, TypeScript rules, and cross-repo propagation. Use when introducing new shared infrastructure or syncing core with gli/genx.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- finografic/ai-agent-configword for word, first seen Aug 13, 2026
Other versions1 project uses a version of this.
Word for word · 1
- finografic/ai-agent-config★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository4 other files it gives its agents.
- apply-design-mdSkill
- generate-design-mdSkill
- maintain-agentsSkill
- scaffold-cli-helpSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Use docs/spec/CLI_CORE.md when designing a new module or documenting exports.
- Very specific: line 27
No imports from repo aliases (utils/*, config/*, commands/*, types/*).
- Very specific: line 28
No side effects on import (beyond const init).
- Very specific: line 39
Add {module-name}.types.ts and tests if needed per docs/spec/CLI_CORE.md.
- Very specific: line 54
tsconfig: ensure "core/*": ["./src/core/*"] exists under compilerOptions.paths.
- Very specific: line 64
Update docs/spec/CLI_CORE.md in genx (Current Modules / new section).
- Distinctive: line 66
Consider a genx template or feature so new scaffolds include the module if applicable.
- Very specific: line 71
Do not pull app-layer code into core/ to “fix” a single repo.
- Distinctive: line 79
Before considering a module “done”:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scaffold / maintain a src/core/ module
This skill applies the portable infrastructure layer pattern: code in src/core/ is treated like a shared library, kept in sync across @finografic CLI repos by convention.
Read first (repo — canonical for this repository)
.agents/instructions/project/core-module-patterns.instructions.md— folder layout, rules, imports, picocolors, header comment, current module table.
Deeper spec (canonical — in this repo)
docs/spec/CLI_CORE.md— full CLI Core Module Spec: whatcore/is, TypeScript rules, consuming from app code, Adding a Newcore/Module checklist, and Current Modules (core/flow/,core/render-help/).
Optional context: A monorepo may use a temporary bulk-task folder (e.g. ___REFACTORING___) for staging reports during large migrations. That folder is not canonical. If REPORT_CLI_NORMALIZATION.md (or similar) exists there, it can add historical “why we moved” notes — use it when present; do not treat it as the source of truth for the spec.
Use docs/spec/CLI_CORE.md when designing a new module or documenting exports; keep this skill as the procedure, not a duplicate of the spec.
Prerequisites
- The module is useful in more than one
@finograficCLI project (not app-specific logic). - No imports from repo aliases (
utils/*,config/*,commands/*,types/*). - No side effects on import (beyond
constinit). - Single clear responsibility.
Procedure — new module
- Choose a kebab-case folder name under
src/core/{module-name}/. Create files (minimum pattern):
{module-name}.utils.ts— implementation (or types-only module if appropriate).index.ts— barrel only public API; named re-exports, no default exports.
Add
{module-name}.types.tsand tests if needed perdocs/spec/CLI_CORE.md.Implementation file header (required on
*.utils.ts):// ⚠️ AVOID EDITING THIS FILE DIRECTLY — changes must be propagated to all @finografic CLI repos- TypeScript rules (core-only):
- Top-level functions:
functionkeyword, notconstarrow for exported module-level functions. - Explicit return types on exports (and internal helpers where practical).
- Named exports only through the barrel.
- Relative imports inside the module use
.jsextensions in import paths where the project uses that rule. - Picocolors:
import pc from 'picocolors'— neverutils/picocolorsfromcore/.
- Top-level functions:
- tsconfig: ensure
"core/*": ["./src/core/*"]exists undercompilerOptions.paths. App code imports only from barrels:
import { createFlowContext } from 'core/flow'; import type { HelpConfig } from 'core/render-help';- Cross-repo workflow (required for real
core/changes):- Update
docs/spec/CLI_CORE.mdin genx (Current Modules / new section). - Propagate the same files (or a reviewed diff) to every
@finograficCLI repo that ships that module. - Consider a genx template or feature so new scaffolds include the module if applicable.
- Update
Procedure — edit existing module
- Assume changes may need identical patches in
genx,gli, and any other consumer. - Do not pull app-layer code into
core/to “fix” a single repo.
Related skills
- scaffold-cli-help — consumer of
core/render-help; use when only changingcli.help.tsand not adding a new core package.
Checklist (copy from docs/spec/CLI_CORE.md)
Before considering a module “done”:
- Useful across multiple CLI projects
- No repo-specific alias imports
- No import side effects
- Single responsibility
- Barrel
index.tspresent - ⚠️ header on implementation files
core/*path alias intsconfig.json- Documented in
docs/spec/CLI_CORE.md(genx) - Propagated to other repos as needed
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.

