/SKILL.md
Proactively discover AI rules, prompts, agents, skills, and skill bundles exposed by npm packages in a project, integrate them into editor-specific rule/config files (AGENTS.md, .cursor/rules, .rules, etc.), and, when appropriate, install reusable skills via the skills package (skills.sh). Use this skill when opening a project, after dependencies change, or before relying on a package so you can reuse existing rules/skills instead of recreating them from scratch.
npx skillsauth add ivoilic/discover-package-skills discover-package-skillsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill teaches you to act as a lightweight, in-editor helper focused on
discovering and integrating package-provided rules/skills and on
installing reusable skills from the Skills ecosystem (skills.sh).
Keep the behavior proactive: whenever you start working in a project, see new or changed dependencies, or are about to rely on a package, first ask:
“Does this project or package already provide rules, prompts, agents, or skills that I should use?”
If the answer might be yes, apply this skill.
Be proactive
package.json or lockfiles change (new/updated dependencies), re-run discovery
for the affected packages.Act as an in-editor alternative to dedicated CLIs
Respect user and project rules
AGENTS.md at the repo root and obey any instructions it contains..cursor/rules/, .cursor/skills/.rules (unified or Zed-style).windsurfrules.github/instructions/CLAUDE.md, GEMINI.md, or similar editor-specific filespnpm.lodash and avoid TypeScript any when writing TS helpers.Follow this workflow whenever the skill triggers.
AGENTS.md (Codex-style agents file). Prefer this as the primary, unified
aggregation format when it exists..cursor/rules/ (Cursor rules) and .cursor/skills/ (Cursor skills)..rules (unified or Zed-style rules file in the project root)..windsurfrules (Windsurf rules)..github/instructions/ (VSCode instructions-style rules).CLAUDE.md, GEMINI.md, or other editor-specific configuration files.AGENTS.md at the root and use it as the
unified aggregation point for discovered package skills and rules.package.json at the root.dependencies, devDependencies, and optionally peerDependencies.node_modules/<packageName> (or the equivalent workspace location).llms, rules, agents, skills, or similar
(e.g. node_modules/<pkg>/llms.(ts|js|mjs|cjs)).package.json pointing to ./llms, ./rules, ./agents, ./skills, etc.UNIFIED_RULES_CONVENTION.md.rules.cursor/rules/.github/instructions/AGENTS.mdnode_modules or node_modules/<packageName> cannot be read or does not exist
(for example in remote/sandboxed environments or when dependencies are installed
outside the workspace), fall back to command-based discovery:
pnpm ls <packageName> --depth 10npm ls <packageName> --depth 10yarn why <packageName>node_modules/<packageName>: look for llms, rules, agents,
skills, convention docs, and other rule/skill exports.<workspace>/**/<packageName>/package.json)
and inspect those.require/import only when absolutely necessary and safe.When you find a candidate rules/skills module or file, try to interpret its structure. Common patterns include:
Single string export
name field nearby, orArray of strings
Array of rule objects
name: stringrule: string (rule content)description?: stringalwaysApply?: booleanglobs?: string | string[] (file targeting patterns)content instead of rule, applyTo instead of
globs). Infer intent from context and documentation.Documented conventions
Normalize each discovered rule into an internal representation containing at least:
packageNameruleNamecontentdescription, alwaysApply, globs / targeting info.Whenever you successfully interpret new rules, prompts, agents, or skills from a package (i.e. content that was not previously integrated), clearly surface this discovery to the user with a short, structured log line in your response:
🕵️ New [skills/rules/prompts] found in package [<package-name>]Will be added to .cursor/rules/ as separate .mdc files. or
Will be updated in AGENTS.md under the package skills section.).Keep this notification concise; it is meant as a quick heads-up, not a detailed report.
Some packages are not just rule providers; they are skill bundles compatible with the
Skills ecosystem (skills.sh).
When discovery reveals that a package can be installed as a skill:
skills package rather than re-implementing the same skill
manually. Typical commands include:
pnpm dlx skills add <owner/repo>npx skills add <owner/repo>bunx skills add <owner/repo>pnpm-lock.yaml exists, prefer pnpm dlx.yarn.lock exists, consider yarn dlx or npx depending on conventions.package-lock.json exists, npx is reasonable.If installation is not allowed or appropriate, still use the package’s embedded rules for this project by mapping them into local rule/config files (next step).
For each normalized rule, map it into the project’s editor-specific configuration. Prefer idempotent updates: if a rule with the same name already exists, update it in place instead of duplicating it.
Use normalized names like:
<packageName>_<ruleName><packageName> when there is a single rule.Then apply these patterns:
Cursor (cursor)
.cursor/rules/<normalized-name>.mdc.description, alwaysApply, globs.Codex (codex)
AGENTS.md in the project root (or as specified by project conventions).<normalized-name> ... </normalized-name>Windsurf (windsurf)
.windsurfrules.<normalized-name> ... </normalized-name> convention when appropriate.Zed / Unified (zed / unified)
.rules in the project root.VSCode instructions (vscode)
.github/instructions/<normalized-name>.instructions.md.applyTo: "**" unless a more specific pattern is
clearly indicated by the rule metadata.Claude Code / Gemini
CLAUDE.md / GEMINI.md.<normalized-name> ... </normalized-name>, encoding metadata as needed.For all editors:
GEMINI.md if nothing else references Gemini).Before adding or updating any rule/skill content, first check whether it has already been imported from the same package:
Version drift and re-scan triggers
package.json or the lockfile no longer
matches the version recorded in your <!-- Copied from ... --> comments, treat this as
a signal to re-run discovery for that package.Be cautious with new dependencies
pnpm for JS/TS projects
when the package manager is ambiguous.Avoid destructive operations
Traceability
from [email protected]).<!-- Copied from <package-name>@<version> by discover-package-skills 🕵️ -->package.json/lockfiles later to
detect when a package has been upgraded so you can re-run discovery for that package’s
rules/skills.Conflict and overlap handling
Package usage vs. package development
Security and safety checks
Keep these examples in mind as patterns; they are not strict scripts.
Example A: Feature implementation using an existing package
🕵️ ...), and integrate or update those rules in the project’s
rule/config files.Example B: New dependency added
package.json now includes a new package.llms module exporting rule objects and
a README describing how they should be used.skills.sh and installations are
allowed, you install it using the appropriate skills add command.Example C: User asks to use a package
These scenarios are guidance for your default behavior whenever you are working with packages that may carry reusable AI rules or skills.
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
testing
Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
testing
Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).