Skip to content

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

@uje-m

Description

@uje-m

Problem

When the dev-browser skill is installed in Amp, it loads many unnecessary files into context:

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

This wastes context tokens and slows down skill loading.

Root Cause

The skills/dev-browser/package.json has no files field, so everything in the directory gets copied during installation. The root .gitignore excludes tmp/ but this does not apply when Amp copies the skill directory.

Recommended Fix

Add a files field to skills/dev-browser/package.json (allowlist approach - more robust long-term):

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

This explicitly includes only production files, automatically excluding dev artifacts, build configs, and generated files like tmp/.

Alternative

Add .npmignore in skills/dev-browser/:

tmp/
*.config.ts
tsconfig.json
bun.lock
profiles/

The files allowlist is preferred as it requires less maintenance when new dev artifacts are added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions