Windsurf + Aider targets, MCP server, and demo placement (#33)
Broadens both reach (more tools) and content types (an MCP server), continuing the multi-platform story. Windsurf + Aider: - build-exports.mjs gains two platforms: exports/windsurf/*.md (workspace rules, trigger: model_decision) and exports/aider/*.md (conventions for `aider --read`). Now 5 platforms (ChatGPT, Gemini, Cursor, Windsurf, Aider). - install.sh + bin/cli.mjs install both (windsurf -> .windsurf/rules, aider -> .aider/skills with a --read hint); generated README index is excluded from copies. - One-line windsurf-install.sh / aider-install.sh wrappers for parity. MCP server (new content type): - mcp/server.mjs — zero-dependency stdio MCP server exposing list_skills, search_skills, get_skill. Published as a second bin (pm-claude-skills-mcp). Logs to stderr; reads bundled skills/ at startup. mcp/README.md documents client config. Also: README hero "See it in action" demo placement (ready to swap in a GIF; recording guide in web/docs-assets/README.md), Works-With table + exports + install docs updated, CHANGELOG Unreleased. package.json files/bin updated. Claude-Session: https://claude.ai/code/session_016JWn5jRD5tcEFKrubjQ6Px Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# One-line installer for Aider. Clones the library (or updates an existing
|
||||
# clone) and installs all skills where Aider can discover them.
|
||||
#
|
||||
# bash <(curl -fsSL https://raw.githubusercontent.com/mohitagw15856/pm-claude-skills/main/scripts/aider-install.sh)
|
||||
#
|
||||
# Cross-platform alternative (incl. Windows): npx pm-claude-skills add --agent aider
|
||||
set -euo pipefail
|
||||
AGENT="aider"
|
||||
REPO_URL="https://github.com/mohitagw15856/pm-claude-skills.git"
|
||||
DEST="${PM_SKILLS_DIR:-$HOME/.pm-claude-skills}"
|
||||
if [ -d "$DEST/.git" ]; then
|
||||
echo "Updating existing clone at $DEST"; git -C "$DEST" pull --ff-only --quiet || echo "(using existing checkout)"
|
||||
else
|
||||
echo "Cloning library into $DEST"; git clone --depth 1 "$REPO_URL" "$DEST"
|
||||
fi
|
||||
exec bash "$DEST/scripts/install.sh" --agent "$AGENT" "$@"
|
||||
@@ -60,6 +60,25 @@ const PLATFORMS = {
|
||||
render: ({ description, body }) =>
|
||||
`---\ndescription: ${JSON.stringify(description)}\nglobs:\nalwaysApply: false\n---\n\n${body.trim()}\n`,
|
||||
},
|
||||
windsurf: {
|
||||
label: 'Windsurf — workspace rule (.md)',
|
||||
dir: 'exports/windsurf',
|
||||
file: (s) => `${s.name}.md`,
|
||||
groupByBundle: true,
|
||||
// Windsurf reads `.windsurf/rules/*.md`. trigger:model_decision = the agent
|
||||
// pulls the rule in when the description matches the task.
|
||||
render: ({ description, body }) =>
|
||||
`---\ntrigger: model_decision\ndescription: ${JSON.stringify(description)}\n---\n\n${body.trim()}\n`,
|
||||
},
|
||||
aider: {
|
||||
label: 'Aider — conventions file (.md)',
|
||||
dir: 'exports/aider',
|
||||
file: (s) => `${s.name}.md`,
|
||||
groupByBundle: true,
|
||||
// Aider has no auto-discovery dir — you load a file into context with
|
||||
// `aider --read <file>`. So this is the plain body, ready to --read.
|
||||
render: ({ body }) => `${body.trim()}\n`,
|
||||
},
|
||||
};
|
||||
|
||||
// ── Helpers (shared shape with web/build-skills.mjs) ────────────────────────
|
||||
|
||||
+19
-12
@@ -32,18 +32,21 @@ default_target() {
|
||||
codex) echo "$HOME/.codex/skills" ;;
|
||||
openclaw) echo "$HOME/.openclaw/skills" ;;
|
||||
cursor) echo "$PWD/.cursor/rules" ;;
|
||||
windsurf) echo "$PWD/.windsurf/rules" ;;
|
||||
aider) echo "$PWD/.aider/skills" ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
list_agents() {
|
||||
echo "Supported agents and default targets:"
|
||||
for a in claude hermes codex openclaw cursor; do
|
||||
for a in claude hermes codex openclaw cursor windsurf aider; do
|
||||
printf " %-9s %s\n" "$a" "$(default_target "$a")"
|
||||
done
|
||||
echo
|
||||
echo "Native SKILL.md agents: claude, hermes, codex, openclaw (install skill folders)."
|
||||
echo "Cursor installs generated .mdc rules from exports/cursor/."
|
||||
echo "Cursor (.mdc) / Windsurf (.md) install generated rule files; Aider installs"
|
||||
echo "conventions you load with 'aider --read'."
|
||||
echo "Targets are sensible defaults — override with --target if your setup differs."
|
||||
}
|
||||
|
||||
@@ -80,18 +83,20 @@ count=0
|
||||
if [ "$DRYRUN" = 1 ]; then echo "[dry-run] Installing skills for '$AGENT' into $TARGET";
|
||||
else echo "Installing skills for '$AGENT' into $TARGET"; mkdir -p "$TARGET"; fi
|
||||
|
||||
if [ "$AGENT" = "cursor" ]; then
|
||||
# Install generated .mdc rules (flattened) into .cursor/rules/.
|
||||
CURSOR_DIR="$REPO_DIR/exports/cursor"
|
||||
if [ ! -d "$CURSOR_DIR" ]; then
|
||||
echo "Error: $CURSOR_DIR missing. Run: node scripts/build-exports.mjs" >&2; exit 1
|
||||
if [ "$AGENT" = "cursor" ] || [ "$AGENT" = "windsurf" ] || [ "$AGENT" = "aider" ]; then
|
||||
# Install generated rule/conventions files (flattened) into the target dir.
|
||||
EXPORT_DIR="$REPO_DIR/exports/$AGENT"
|
||||
EXT='*.md'; [ "$AGENT" = "cursor" ] && EXT='*.mdc'
|
||||
if [ ! -d "$EXPORT_DIR" ]; then
|
||||
echo "Error: $EXPORT_DIR missing. Run: node scripts/build-exports.mjs" >&2; exit 1
|
||||
fi
|
||||
while IFS= read -r mdc; do
|
||||
base="$(basename "$mdc")"
|
||||
while IFS= read -r f; do
|
||||
base="$(basename "$f")"
|
||||
[ "$base" = "README.md" ] && continue # skip the generated index
|
||||
if [ "$DRYRUN" = 1 ]; then echo " would install $base -> $TARGET/$base";
|
||||
else cp "$mdc" "$TARGET/$base"; fi
|
||||
else cp "$f" "$TARGET/$base"; fi
|
||||
count=$((count + 1))
|
||||
done < <(find "$CURSOR_DIR" -name '*.mdc' | sort)
|
||||
done < <(find "$EXPORT_DIR" -name "$EXT" | sort)
|
||||
else
|
||||
# Native SKILL.md agents: place each skill folder.
|
||||
for skill in "$SKILLS_DIR"/*/; do
|
||||
@@ -126,7 +131,9 @@ if [ "$DRYRUN" = 1 ]; then
|
||||
else
|
||||
echo "Installed $count item(s) for '$AGENT'."
|
||||
case "$AGENT" in
|
||||
cursor) echo "Cursor will pick up the rules in $TARGET on its next session." ;;
|
||||
cursor) echo "Cursor will pick up the rules in $TARGET on its next session." ;;
|
||||
windsurf) echo "Windsurf will pick up the rules in $TARGET on its next session." ;;
|
||||
aider) echo "Load any of them with: aider --read $TARGET/<skill>.md" ;;
|
||||
*) echo "Restart $AGENT — it auto-discovers SKILL.md skills in $TARGET by their description." ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# One-line installer for Windsurf. Clones the library (or updates an existing
|
||||
# clone) and installs all skills where Windsurf can discover them.
|
||||
#
|
||||
# bash <(curl -fsSL https://raw.githubusercontent.com/mohitagw15856/pm-claude-skills/main/scripts/windsurf-install.sh)
|
||||
#
|
||||
# Cross-platform alternative (incl. Windows): npx pm-claude-skills add --agent windsurf
|
||||
set -euo pipefail
|
||||
AGENT="windsurf"
|
||||
REPO_URL="https://github.com/mohitagw15856/pm-claude-skills.git"
|
||||
DEST="${PM_SKILLS_DIR:-$HOME/.pm-claude-skills}"
|
||||
if [ -d "$DEST/.git" ]; then
|
||||
echo "Updating existing clone at $DEST"; git -C "$DEST" pull --ff-only --quiet || echo "(using existing checkout)"
|
||||
else
|
||||
echo "Cloning library into $DEST"; git clone --depth 1 "$REPO_URL" "$DEST"
|
||||
fi
|
||||
exec bash "$DEST/scripts/install.sh" --agent "$AGENT" "$@"
|
||||
Reference in New Issue
Block a user