Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add jroslaniec/agent-skills --skill "skill-new"
Install specific skill from multi-skill repository
# Description
Create or update Agent Skills for any supported coding agent. Use when the user asks how to author a skill, requests a new skill directory, or needs updates for their installed coding agent(s).
# SKILL.md
name: skill-new
description: Create or update Agent Skills for any supported coding agent. Use when the user asks how to author a skill, requests a new skill directory, or needs updates for their installed coding agent(s).
allowed-tools: Read, Write, Edit, Bash, Glob
Skill New (Cross-Agent)
Use this skill to guide users through planning, authoring, and testing Agent Skills for any supported coding agents. Prefer a project-level skills/ directory when it exists; otherwise detect installed agents and confirm the destination with the user before writing files.
Overview
- Helps determine where to place skills (project vs personal) and how to scaffold them consistently.
- Includes helper scripts for path detection and initializing a skill skeleton.
- Bundles the official Agent Skills specification and overview docs for offline reference.
- Applicable to both procedural workflows and informational/documentation skills.
Bundled Resources
scripts/detect-skill-paths.shโ Walks from the current directory up to$HOME, checking for common skill directories (skills/,.claude/skills/,~/.config/opencode/skills/, etc.). Always announce your working directory before running it. Example success output:
```text
Detected Agent Skill directories:- scope=project path=/repo/skills
- scope=project path=/repo/.claude/skills
- scope=user path=/Users/example/.claude/skills
`` If nothing is found it printsNo well-known Agent Skill directories detected betweenand .` and exits with status 1. scripts/init-skill.sh <skill-name> <target-dir>โ Createsskill-name/withSKILL.md,scripts/,references/,assets/, and a pre-filled template containing[TODO: ...]placeholders. Example:
bash <skill-location-dir>/scripts/init-skill.sh processing-pdfs skills- References (all paths are relative to the installed skill directory):
references/home.mdโ Agent Skills overview.references/integrate-skills.mdโ How agents discover skills.references/specification.mdโ Full spec (frontmatter rules, directory layout, validation).references/what-are-skills.mdโ Intro primer.
Quick Start
- Announce current directory: e.g., โRunning from
/Users/me/projectโ. - Detect destinations: run
<skill-location-dir>/scripts/detect-skill-paths.sh. If a top-levelskills/directory exists in the project, use that by default. Otherwise, review the script output. - Clarify placement:
- If multiple locations are listed, ask the user where to install the skill (project
skills/,.claude/skills/, personal config, etc.). - If nothing is detected, ask which agent(s) they use and whether to create
skills/or.claude/skills/in the repo. - Scaffold or edit:
- For new skills, run
<skill-location-dir>/scripts/init-skill.sh <skill-name> <target-dir>. - For existing skills, open the current
SKILL.mdand supporting files. - Document everything: replace
[TODO: ...]markers, describe scripts with<skill-location-dir>, and link references. - Validate & test: run
skills-ref validate, ensure scripts are executable, and remind the user to restart their agent and test trigger phrases.
Core Workflow
- Gather requirements โ Confirm scope (project
skills/vs personal), supported agents, triggers/keywords, needed assets/scripts, and whether the skill is procedural or informational. - Plan resources โ Decide which supporting files belong in
scripts/,references/, orassets/. Prefer references for detailed documentation and scripts for deterministic tasks. - Create directories โ Use the init script (preferred) or
mkdir -p <destination>/<skill-name>/{scripts,references,assets}. Ensure the skill directory name matches thenamefield (lowercase hyphenated). - Author
SKILL.mdโ Follow this section order (matching the template): Overview, Bundled Resources, Quick Start, Core Workflow, Helper Scripts, Important Rules, Checklist. Keep under ~500 lines and reference scripts via<skill-location-dir>. - For informational skills, describe how to navigate references instead of procedural steps.
- Add scripts/references โ Place helpers in
scripts/(mark executable) and documentation inreferences/. Mention each file once inSKILL.mdwith guidance on when to read or run it. - Validate & test โ Run
skills-ref validate <skill-path>if available, lint/check scripts, and verify instructions by triggering the skill manually. Remind the user to restart their agent so changes load.
Helper Scripts
| Script | Purpose | Notes |
|---|---|---|
<skill-location-dir>/scripts/detect-skill-paths.sh |
Finds project and user skill directories between the current directory and $HOME. |
State working directory before running; ask the user which destination to use when multiple paths appear. |
<skill-location-dir>/scripts/init-skill.sh <skill> <dir> |
Bootstraps the recommended skill structure with [TODO: ...] placeholders. |
Validates skill names, creates scripts/, references/, assets/, and prints next steps. |
Important Rules & Best Practices
- ALWAYS announce the working directory before running helper scripts and confirm the installation path if multiple directories are detected.
- ALWAYS reference scripts using
<skill-location-dir>/...so readers know paths resolve relative to the installed skill. - ALWAYS include trigger keywords in the
description; use lowercase hyphenated names matching the directory. - NEVER exceed ~500 lines in
SKILL.md; move detailed material toreferences/and link to it once. - NEVER include AI attribution in generated instructions, commits, or PRs.
Recommended Skill Structure
skill-name/
โโโ SKILL.md # Overview, Bundled Resources, Quick Start, Core Workflow, Helper Scripts, Important Rules, Checklist
โโโ scripts/ # Executable helpers (optional)
โโโ references/ # Detailed docs (optional)
โโโ assets/ # Templates/resources used in outputs (optional)
Mini-template excerpt (mirrors the init script):
## Overview
- [TODO: One-sentence summary]
- [TODO: Trigger phrases]
## Quick Start
1. [TODO: Minimal steps or navigation guidance]
## Core Workflow
1. [TODO: Procedural steps or reference map]
## Helper Scripts
| `<skill-location-dir>/scripts/example.sh` | [TODO: purpose] | [TODO: notes] |
## Important Rules
- **ALWAYS** [TODO]
- **NEVER** [TODO]
## Checklist
- [ ] [TODO: validations]
Validation & Testing
- Run
skills-ref validate <skill-path>(from the Agent Skills reference tooling) to catch schema issues. - Ensure every script is executable (
chmod +x) and includes usage instructions. - If the skill depends on external assets or references, verify paths and mention them once.
- After updates, remind the user to restart their agent and test trigger phrases relevant to the description.
Checklist before handing off
- [ ] Placement confirmed (project
skills/preferred when present; otherwise agreed destination per agent). - [ ]
SKILL.mdfrontmatter valid; description states WHAT + WHEN + trigger keywords. - [ ] Sections follow the recommended order and reference supporting files once using relative paths.
- [ ] Scripts documented with
<skill-location-dir>and marked executable. - [ ] References linked with clear โread whenโฆโ guidance (especially for informational skills).
- [ ] Validation/tests completed and the user reminded to restart their agent and exercise the skill.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.