Skip to content
Back to skills

Authoring Global Scripts

ASecurity

'Authors and manages global package scripts using the _: prefix convention.

  • 18 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 4, 2026
documentationgo

Security analysis

A100/100

Scanned September 4, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill authoring-global-scripts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Authoring Global Scripts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Authoring Global Scripts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-authoring-global-scripts-claude-skill-registry-data/badge)](https://www.skillsdirectory.com/skills/majiayu000-authoring-global-scripts-claude-skill-registry-data)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: authoring-global-scripts
description: 'Authors and manages global package scripts using the _: prefix convention.
  Scripts defined in root package.json are propagated to all packages with the prefix
  stripped.'
---

---
name: authoring-global-scripts
description: Authors and manages global package scripts using the _: prefix convention. Scripts defined in root package.json are propagated to all packages with the prefix stripped.
---

# Authoring Global Scripts

Manage package scripts that apply to all packages in the monorepo.

## Steps

### Adding a Global Script

1. Add script to root `package.json` with `_:` prefix:
   ```json
   {
     "scripts": {
       "_:build": "tsgo -p tsconfig.build.json",
       "_:check:types": "tsgo --noEmit"
     }
   }
   ```

2. Run the sync script at `.claude/skills/authoring-global-scripts/scripts/sync-package-scripts.ts`

### Auditing for Inconsistencies

Run with `--check` flag to verify all packages are in sync without modifying:
```
tsx .claude/skills/authoring-global-scripts/scripts/sync-package-scripts.ts --check
```

## Reference

### Convention

| Location | Format | Example |
|----------|--------|---------|
| Root package.json | `_:script-name` | `"_:build": "tsgo -p tsconfig.build.json"` |
| Package package.json | `script-name` | `"build": "tsgo -p tsconfig.build.json"` |

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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…