Skip to content

feat(claude): add skill installer script - #579

Merged
shunkakinoki merged 3 commits into
mainfrom
feat/add-skill-installer
Jan 15, 2026
Merged

feat(claude): add skill installer script#579
shunkakinoki merged 3 commits into
mainfrom
feat/add-skill-installer

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Jan 15, 2026

Copy link
Copy Markdown
Owner

Add `install-skills.sh` to install agent skills from external repositories using `add-skill` CLI.

Usage

```bash
./config/claude/install-skills.sh
```

Skills installed

From vercel-labs/agent-skills:

  • vercel-react-best-practices: 40+ React/Next.js performance optimization rules
  • web-design-guidelines: 100+ UI/UX best practices

Skills are installed to `~/.claude/skills/` and automatically available to Claude Code.


Summary by cubic

Adds a script to install Claude Code agent skills from external repositories using the add-skill CLI. Installs React best practices and web design guidelines to ~/.claude/skills and makes them available in Claude Code.

  • New Features
    • Script added at config/claude/install-skills.sh; also installed to ~/.claude/install-skills.sh via Nix
    • Run with: ./config/claude/install-skills.sh or ~/.claude/install-skills.sh

Written for commit d82e7bd. Summary will update on new commits.

Copilot AI review requested due to automatic review settings January 15, 2026 16:05
@coderabbitai

coderabbitai Bot commented Jan 15, 2026

Copy link
Copy Markdown

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Introduced agent skills installation system, now including React best practices and web design guidelines modules to provide enhanced development recommendations.
  • Tests

    • Added comprehensive test suite validating skills installation process, including syntax verification, strict mode enforcement, execution permissions, and non-interactive mode functionality.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds a new Bash installer at config/claude/install-skills.sh, registers it as an executable in config/claude/default.nix, and introduces shellspec tests plus coverage updates to validate the installer invokes npx add-skill to install two skills for the claude-code agent.

Changes

Cohort / File(s) Summary
Installer script
config/claude/install-skills.sh
New Bash script (strict mode) that runs npx add-skill vercel-labs/agent-skills ... to install vercel-react-best-practices and web-design-guidelines targeting claude-code, with progress messages and completion output.
Nix home integration
config/claude/default.nix
Adds home.file.".claude/install-skills.sh" pointing to the new script and sets it executable.
Tests and coverage
spec/install_skills_spec.sh, spec/coverage_spec.sh
New shellspec test suite for the installer (syntax, strict mode, executable, mocked npx invocations, argument/assertion checks). Coverage spec updated to include the new script in non-spec shell scripts list.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped a patch across the lawn,

Scripts and skills at early dawn,
Two packages fetched with nimble feet,
Claude can learn — how sweet, how neat! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main change: adding a skill installer script for Claude agent.
Description check ✅ Passed The description is well-documented and directly related to the changeset, explaining the purpose, usage, skills installed, and installation paths.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-skill-installer

🧹 Recent nitpick comments
spec/install_skills_spec.sh (1)

40-68: Consider consolidating the repeated test invocations.

Each test case in lines 40-68 runs the same bash -c 'bash '"$SCRIPT"'; cat "$MOCK_LOG"' invocation independently to verify individual arguments (vercel-labs/agent-skills, --agent claude-code, vercel-react-best-practices, web-design-guidelines, --yes). These could be consolidated into fewer test cases that check multiple arguments in a single invocation, reducing duplication.

However, the current approach provides clearer failure messages when a specific argument is missing, which is a reasonable trade-off.


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8008ef8 and d82e7bd.

📒 Files selected for processing (3)
  • config/claude/default.nix
  • spec/coverage_spec.sh
  • spec/install_skills_spec.sh
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{sh,bash}

📄 CodeRabbit inference engine (CLAUDE.md)

Use shfmt with 2-space indentation for shell scripts

**/*.{sh,bash}: Use 2 spaces for indentation in shell scripts
Add proper shebang lines to shell scripts
Follow shellcheck recommendations in shell scripts
Document complex commands in shell scripts
Use consistent variable naming in shell scripts

Files:

  • spec/install_skills_spec.sh
  • spec/coverage_spec.sh
**/*.nix

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.nix: Use nixfmt for formatting all Nix files
Document complex configurations with comments in Nix files

**/*.nix: Use 2 spaces for indentation in Nix files
Keep line length under 100 characters in Nix files
Sort attribute sets alphabetically in Nix files
Use consistent spacing around operators in Nix files
Format lists and sets consistently in Nix files

Use treefmt.toml for formatting Nix files

**/*.nix: Use mkOption for configurable options in Nix modules
Implement proper typing for all options in Nix modules
Follow the Nix expression language style guide

Files:

  • config/claude/default.nix
**/default.nix

📄 CodeRabbit inference engine (CLAUDE.md)

Use default.nix files for module exports

Files:

  • config/claude/default.nix
🧠 Learnings (3)
📚 Learning: 2025-11-25T09:34:55.014Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-11-25T09:34:55.014Z
Learning: Applies to home-manager/programs/**/*.nix : Follow program-specific best practices in program configuration files

Applied to files:

  • config/claude/default.nix
📚 Learning: 2025-11-25T09:34:55.014Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-11-25T09:34:55.014Z
Learning: Applies to home-manager/programs/**/default.nix : Program configurations must include all necessary dependencies in their configuration

Applied to files:

  • config/claude/default.nix
📚 Learning: 2025-11-25T09:34:32.423Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/formatting.mdc:0-0
Timestamp: 2025-11-25T09:34:32.423Z
Learning: Applies to **/*.{sh,bash} : Follow shellcheck recommendations in shell scripts

Applied to files:

  • spec/coverage_spec.sh
🧬 Code graph analysis (1)
spec/install_skills_spec.sh (1)
spec/support/custom_matcher.sh (2)
  • mock_bin_setup (5-25)
  • mock_bin_cleanup (27-35)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: docker-build-push (linux/arm64, arm64, ubuntu-24.04-arm)
  • GitHub Check: docker-build-push (linux/amd64, amd64, ubuntu-latest)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: nix-linux
  • GitHub Check: lua-hammerspoon
  • GitHub Check: nix-darwin
  • GitHub Check: lua-neovim-test
  • GitHub Check: lua-neovim
  • GitHub Check: nix-nixos
  • GitHub Check: shell-lint
  • GitHub Check: shell-test
  • GitHub Check: e2e-run (MacOS, macos-latest)
  • GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
  • GitHub Check: e2e-run (NixOS, ubuntu-latest)
🔇 Additional comments (6)
config/claude/default.nix (1)

27-30: LGTM!

The new home file entry follows the established pattern of existing executable scripts in this configuration. Formatting is consistent with 2-space indentation per coding guidelines.

spec/coverage_spec.sh (2)

24-26: LGTM!

Test case follows the established pattern and correctly references the spec file path spec/install_skills_spec.sh.


100-101: LGTM!

The script is correctly added to the coverage list, maintaining alphabetical order within the config/claude/ group.

spec/install_skills_spec.sh (3)

1-5: LGTM!

Proper shebang and shellcheck disable comments. The SC2329 disable is appropriate for shellspec's function definitions, and SC2016 allows single-quoted strings with $ that shouldn't be expanded.


7-22: LGTM!

Comprehensive structure tests covering syntax validation, strict mode enforcement, and executable permissions. This follows the established testing patterns in this repository.


24-38: LGTM!

Good use of the mock_bin_setup/mock_bin_cleanup helpers with proper Before/After hooks for test isolation.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new utility script, install-skills.sh, to streamline the process of adding agent skills to Claude Code. By automating the installation of key skills like React/Next.js best practices and web design guidelines, it aims to enhance Claude's capabilities and simplify the initial setup for developers, ensuring consistent and efficient skill deployment.

Highlights

  • New Skill Installer Script: Introduces config/claude/install-skills.sh, a new bash script designed to automate the installation of agent skills.
  • Automated Skill Installation: The script leverages npx add-skill to fetch and install skills from external repositories.
  • Pre-configured Skills: Specifically installs "vercel-react-best-practices" and "web-design-guidelines" from vercel-labs/agent-skills for the claude-code agent.
  • Simplified Setup: These skills are automatically made available to Claude Code, simplifying the setup process for developers.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mesa-dot-dev

mesa-dot-dev Bot commented Jan 15, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Adds a script to install Claude Code agent skills from external repositories using the add-skill CLI.

What changed?

  • config/claude/install-skills.sh: New script to install vercel-react-best-practices and web-design-guidelines skills for Claude Code.
  • config/claude/default.nix: Configured to deploy the install-skills.sh script to ~/.claude/install-skills.sh and make it executable.
  • spec/coverage_spec.sh: Updated to include the new config/claude/install-skills.sh in coverage checks.
  • spec/install_skills_spec.sh: New test file added to verify the install-skills.sh script's syntax, permissions, and correct npx add-skill invocation.

Description generated by Mesa. Update settings

Add install-skills.sh to install agent skills from external repositories.

Uses npx add-skill CLI (https://agentskills.io) to install:
- vercel-react-best-practices: 40+ React/Next.js performance rules
- web-design-guidelines: UI/UX best practices

Run: ./config/claude/install-skills.sh

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new shell script, install-skills.sh, to install agent skills for Claude Code from external repositories. The script is straightforward and uses npx add-skill to perform the installation. My review focuses on improving the script's robustness, security, and clarity. I've suggested adding a dependency check for npx, pinning the version of the add-skill package to enhance security and ensure reproducible builds, and a minor correction to the final output message for better accuracy. These changes will make the script more reliable and secure.


# Install Vercel agent-skills (React best practices + Web design guidelines)
# https://github.com/vercel-labs/agent-skills
npx add-skill vercel-labs/agent-skills \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

For security and reproducibility, it's highly recommended to pin the version of the npm package being executed with npx. Using npx add-skill without a version specifier will always fetch the latest version. This could unexpectedly introduce breaking changes or even security vulnerabilities if the package is compromised (a supply chain attack). Pinning to a specific version ensures that the script's behavior is consistent and secure over time. Please find the current stable version of add-skill and specify it.

Suggested change
npx add-skill vercel-labs/agent-skills \
npx add-skill@<version> vercel-labs/agent-skills \


set -euo pipefail

echo "Installing agent skills..."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The script executes npx without first checking if it's available. If npx is not installed or not in the PATH, the script will fail with a generic 'command not found' error. It's better practice to add an explicit check for dependencies at the start of a script to provide a more user-friendly error message.

Suggested change
echo "Installing agent skills..."
if ! command -v npx &> /dev/null; then
echo "Error: npx could not be found. Please install Node.js." >&2
exit 1
fi
echo "Installing agent skills..."

--skill web-design-guidelines \
--yes

echo "Done! Skills installed to ~/.claude/skills/"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The tilde ~ character is not expanded to the user's home directory when it is inside double quotes. This means the output will literally be Done! Skills installed to ~/.claude/skills/. While users will likely understand this, using the $HOME environment variable is more explicit and guarantees correct expansion by the shell, making the output message more accurate.

Suggested change
echo "Done! Skills installed to ~/.claude/skills/"
echo "Done! Skills installed to $HOME/.claude/skills/"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a bash script to install Claude Code agent skills from the Vercel agent-skills repository using the add-skill CLI tool. The script automates the installation of React best practices and web design guidelines skills to enhance Claude Code's capabilities.

Changes:

  • Added config/claude/install-skills.sh script that uses npx add-skill to install two skills from vercel-labs/agent-skills repository

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +12 to +16
npx add-skill vercel-labs/agent-skills \
--agent claude-code \
--skill vercel-react-best-practices \
--skill web-design-guidelines \
--yes

Copilot AI Jan 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script should verify that Node.js/npx is available before attempting to use it. Other scripts in this repository check for required commands using 'command -v'. Add a check like 'if ! command -v npx >/dev/null 2>&1; then echo "Error: npx is required but not installed"; exit 1; fi' before the npx command.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

Copilot AI Jan 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script lacks test coverage. The repository has comprehensive bash script testing using shellspec (see spec/ directory), and all other scripts in config/claude/ have corresponding spec files. Create spec/install_skills_spec.sh following the pattern used in spec/notify_spec.sh, spec/security_spec.sh, etc. Additionally, update spec/coverage_spec.sh to include 'config/claude/install-skills.sh' in the covered_scripts list (around line 96).

Copilot uses AI. Check for mistakes.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@mesa-dot-dev mesa-dot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed full review of b699cf0...8008ef8

Analysis

  1. The install-skills.sh script bypasses the repository's core Nix/home-manager architecture, introducing an inconsistent, manual installation pathway that breaks reproducibility and automated workflows.

  2. Security concerns arise from using unpinned npx executions to fetch and run arbitrary code from the network without integrity verification, outside of Nix's sandbox protections.

  3. The script lacks idempotency checks, version pinning, and proper dependency management, making it impossible to guarantee consistent environments across installations.

  4. There's no integration with existing patterns (home-manager activation or wrapper scripts with auto-install), creating maintenance confusion and diverging from established repository practices.

  5. The implementation offers no configuration layer, update mechanism, or clear documentation about its lifecycle and intended usage pattern.

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

0 files reviewed | 4 comments | Edit Agent SettingsRead Docs


# Install Vercel agent-skills (React best practices + Web design guidelines)
# https://github.com/vercel-labs/agent-skills
npx add-skill vercel-labs/agent-skills \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium

No version or commit hash specified for vercel-labs/agent-skills. This means the script will always pull the latest version, which could introduce breaking changes or inconsistencies across machines. For reproducibility, consider:

  1. Pinning to a specific commit: vercel-labs/agent-skills@abc1234
  2. Pinning to a release tag: vercel-labs/agent-skills@v1.0.0
  3. Or document that skills should be manually reviewed/updated

Agent: 🏛 Architecture • Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: shunkakinoki/dotfiles#579
File: config/claude/install-skills.sh#L12
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
No version or commit hash specified for `vercel-labs/agent-skills`. This means the script will always pull the latest version, which could introduce breaking changes or inconsistencies across machines. For reproducibility, consider:
1. Pinning to a specific commit: `vercel-labs/agent-skills@abc1234`
2. Pinning to a release tag: `vercel-labs/agent-skills@v1.0.0`
3. Or document that skills should be manually reviewed/updated


# Install Vercel agent-skills (React best practices + Web design guidelines)
# https://github.com/vercel-labs/agent-skills
npx add-skill vercel-labs/agent-skills \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium

No version pinning for the add-skill package. Each time this script runs, it could pull a different version of add-skill, potentially with breaking changes. Consider pinning to a specific version: npx add-skill@1.2.3 (replace with current stable version).

Agent: 🏛 Architecture • Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: shunkakinoki/dotfiles#579
File: config/claude/install-skills.sh#L12
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
No version pinning for the `add-skill` package. Each time this script runs, it could pull a different version of `add-skill`, potentially with breaking changes. Consider pinning to a specific version: `npx add-skill@1.2.3` (replace with current stable version).


# Install Vercel agent-skills (React best practices + Web design guidelines)
# https://github.com/vercel-labs/agent-skills
npx add-skill vercel-labs/agent-skills \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium

Using npx without a Nix-managed path creates a dependency on the system's Node.js installation. In this Nix-based repository, other scripts use path substitution (e.g., ${pkgs.nodejs}/bin/npx) to ensure reproducibility. Consider either:

  1. Adding this script to config/claude/default.nix with pkgs.replaceVars to inject the Nix store path
  2. Converting this to a home-manager activation script like npm-globals does

See home-manager/modules/npm-globals/install-npm-globals.sh for a similar pattern.

Agent: 🏛 Architecture • Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: shunkakinoki/dotfiles#579
File: config/claude/install-skills.sh#L12
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
Using `npx` without a Nix-managed path creates a dependency on the system's Node.js installation. In this Nix-based repository, other scripts use path substitution (e.g., `${pkgs.nodejs}/bin/npx`) to ensure reproducibility. Consider either:
1. Adding this script to `config/claude/default.nix` with `pkgs.replaceVars` to inject the Nix store path
2. Converting this to a home-manager activation script like `npm-globals` does

See `home-manager/modules/npm-globals/install-npm-globals.sh` for a similar pattern.

- Add spec/install_skills_spec.sh with 9 test cases
- Update coverage_spec.sh to include new script
- Add install-skills.sh to nix config (default.nix)

All shell tests pass (326 examples, 0 failures)
Remove indentation to match repo style (treefmt)
@shunkakinoki
shunkakinoki merged commit 3657500 into main Jan 15, 2026
30 checks passed
@shunkakinoki
shunkakinoki deleted the feat/add-skill-installer branch January 15, 2026 19:37
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.

2 participants