Add usehooks-ts AI agent skill and installation docs#722
Conversation
…s, composition recipes, hook catalog, SSR guidance, and testing pitfalls
|
There was a problem hiding this comment.
Pull request overview
Adds a new usehooks-ts “AI agent skill” bundle (prompt + references + agent metadata) plus a Python audit helper script to detect common usehooks-ts integration pitfalls, and documents how to install the skill via npx skills add.
Changes:
- Added
skills/usehooks-tsskill entrypoint (SKILL.md), reference docs, and per-agent YAML metadata. - Added
audit_usehooks_ts_usage.pyscript to scan projects for deep imports, removed hooks, and SSR/client-component pitfalls. - Updated repository and package READMEs with
skills.sh/npx skills addinstallation instructions.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/usehooks-ts/scripts/audit_usehooks_ts_usage.py | New audit script for common import / SSR / migration checks |
| skills/usehooks-ts/references/testing-pitfalls.md | Testing guidance, mocks, and migration pitfalls |
| skills/usehooks-ts/references/ssr-frameworks.md | SSR / hydration guidance for Next.js and other frameworks |
| skills/usehooks-ts/references/hook-catalog.md | Hook selection catalog and API notes aligned to repo v3 |
| skills/usehooks-ts/references/composition-recipes.md | Practical composition examples for common UI behaviors |
| skills/usehooks-ts/agents/windsurf.yaml | Agent metadata for Windsurf |
| skills/usehooks-ts/agents/roo-code.yaml | Agent metadata for Roo Code |
| skills/usehooks-ts/agents/openai.yaml | Agent metadata for OpenAI |
| skills/usehooks-ts/agents/generic.yaml | Generic agent loader metadata |
| skills/usehooks-ts/agents/gemini.yaml | Agent metadata for Gemini |
| skills/usehooks-ts/agents/cursor.yaml | Agent metadata for Cursor |
| skills/usehooks-ts/agents/copilot.yaml | Agent metadata for Copilot |
| skills/usehooks-ts/agents/codex.yaml | Agent metadata for Codex |
| skills/usehooks-ts/agents/cline.yaml | Agent metadata for Cline |
| skills/usehooks-ts/agents/claude-code.yaml | Agent metadata for Claude Code |
| skills/usehooks-ts/agents/aider.yaml | Agent metadata for Aider |
| skills/usehooks-ts/SKILL.md | Skill entrypoint with workflow and core rules |
| packages/usehooks-ts/README.md | Documents installing/using the bundled AI agent skill |
| README.md | Documents installing/using the bundled AI agent skill |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def iter_source_files(root: Path): | ||
| for path in root.rglob("*"): | ||
| if path.is_dir(): | ||
| continue | ||
| if any(part in IGNORE_DIRS for part in path.parts): | ||
| continue | ||
| if path.suffix in SOURCE_EXTENSIONS: | ||
| yield path |
| for raw_line in text.splitlines(): | ||
| line = raw_line.strip() | ||
| if not line or line.startswith("//"): | ||
| continue | ||
| return line in {"'use client'", '"use client"', "'use client';", '"use client";'} |
Summary
usehooks-tsAI agent skill underskills/usehooks-tsusehooks-tsintegration issuesskills.sh/npx skills addinstallation instructionsValidation
agents/*.yamlfiles successfullypython3 skills/usehooks-ts/scripts/audit_usehooks_ts_usage.py .No obvious usehooks-ts issues found.