The _: prefix marks scripts as "global templates". The sync script:
Strips the prefix when copying to packages
Replaces all package scripts (packages should not have custom scripts)
Warns about extra scripts in packages that aren't in the template
Relative Paths
Relative paths like ../../oxlint.json are preserved as-is. They're relative from each package directory, so ../../ correctly points to the monorepo root from packages/*/.
Notes
Packages should NOT have custom scripts - all scripts come from the global template
If a package needs a unique script, reconsider whether it belongs as a global script
Run audit (--check) to catch manual edits that broke the pattern
1---2name: authoring-global-scripts3description: Authoring Global Scripts4---56# Authoring Global Scripts78Manage package scripts that apply to all packages in the monorepo.910## Steps1112### Adding a Global Script13141. Add script to root `package.json` with `_:` prefix:15 ```json16 {17 "scripts": {18 "_:build": "tsgo -p tsconfig.build.json",19 "_:check:types": "tsgo --noEmit"20 }21 }22 ```23242. Run the sync script at `.claude/skills/authoring-global-scripts/scripts/sync-package-scripts.ts`2526### Auditing for Inconsistencies2728Run with `--check` flag to verify all packages are in sync without modifying:29```30tsx .claude/skills/authoring-global-scripts/scripts/sync-package-scripts.ts --check31```3233## Reference3435### Convention3637| Location | Format | Example |38|----------|--------|---------|39| Root package.json | `_:script-name` | `"_:build": "tsgo -p tsconfig.build.json"` |40| Package package.json | `script-name` | `"build": "tsgo -p tsconfig.build.json"` |4142The `_:` prefix marks scripts as "global templates". The sync script:43- Strips the prefix when copying to packages44- Replaces all package scripts (packages should not have custom scripts)45- Warns about extra scripts in packages that aren't in the template4647### Relative Paths4849Relative paths like `../../oxlint.json` are preserved as-is. They're relative from each package directory, so `../../` correctly points to the monorepo root from `packages/*/`.5051## Notes5253- Packages should NOT have custom scripts - all scripts come from the global template54- If a package needs a unique script, reconsider whether it belongs as a global script55- Run audit (`--check`) to catch manual edits that broke the pattern
Run npx skillmds@latest add aibot88/authoring-global-scripts in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Authoring Global Scripts It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
aibot88 (@aibot88) published this skill. Their other Agent Skills are listed on their SkillMD profile.