Skip to content

fix: add files field to skill package.json to exclude unnecessary files#50

Open
koriyoshi2041 wants to merge 1 commit intoSawyerHood:mainfrom
koriyoshi2041:fix/skill-packaging-files-field
Open

fix: add files field to skill package.json to exclude unnecessary files#50
koriyoshi2041 wants to merge 1 commit intoSawyerHood:mainfrom
koriyoshi2041:fix/skill-packaging-files-field

Conversation

@koriyoshi2041
Copy link

Summary

Fixes #47

When the dev-browser skill is installed in Amp/other agents, it includes unnecessary files that waste context tokens and slow down skill loading.

Problem

The skill directory currently includes:

  • tmp/*.png (accumulated screenshots)
  • tsconfig.json
  • vitest.config.ts
  • bun.lock
  • scripts/

Solution

Add explicit files field to skills/dev-browser/package.json:

"files": [
  "src/",
  "references/",
  "SKILL.md",
  "server.sh",
  "package.json"
]

Result

  • Before: All files in directory
  • After: Only 12 production files (27.8 kB total)

Verified with npm pack --dry-run:

npm notice total files: 12
npm notice package size: 27.8 kB

Fixes SawyerHood#47

When the dev-browser skill is installed, it currently includes
unnecessary files like tmp/*.png, tsconfig.json, vitest.config.ts,
bun.lock, etc. This wastes context tokens and slows down skill loading.

Add explicit 'files' field to only include production files:
- src/
- references/
- SKILL.md
- server.sh
- package.json

Package size reduced to 27.8 kB with only 12 necessary files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skill packaging includes unnecessary files (tmp/, config files)

1 participant