Skip to content

Commit 5a86069

Browse files
committed
Fix duplicate skill docs and overly broad tarball cleanup
- Merge duplicate '## Skills' and '## Cursor Skills' sections in agent-setup.md into a single consolidated section with the most complete descriptions - Fix tarball cleanup in packdep.js to use regex matching version number (digit) after prefix, preventing false matches on similarly-named packages (e.g., 'edge-core-' no longer matches 'edge-core-js-*.tgz')
1 parent 72c9476 commit 5a86069

File tree

2 files changed

+18
-67
lines changed

2 files changed

+18
-67
lines changed

.cursor/skills/package-deps/scripts/packdep.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,12 @@ for (const depDir of depDirs) {
6969

7070
// Remove old tarballs for this package from the GUI directory.
7171
// Tarball names follow npm's convention: scoped "@foo/bar" → "foo-bar-*"
72+
// Use regex to match version number (digit) after prefix to avoid matching
73+
// similarly-named packages (e.g., "edge-core-" should not match "edge-core-js-*")
7274
const namePrefix = depName.replace(/^@/, '').replace(/\//, '-')
75+
const prefixPattern = new RegExp(`^${namePrefix}-\\d.*\\.tgz$`)
7376
for (const file of fs.readdirSync(guiDir)) {
74-
if (file.startsWith(namePrefix + '-') && file.endsWith('.tgz')) {
77+
if (prefixPattern.test(file)) {
7578
console.log(` Removing old tarball: ${file}`)
7679
fs.unlinkSync(path.join(guiDir, file))
7780
}

docs/agent-setup.md

Lines changed: 14 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ Execute a planning document and iteratively refine the implementation until it p
3030

3131
## Skills
3232

33-
Skills are defined in `.cursor/skills/` and are automatically invoked by Cursor when relevant. They can also be referenced from commands via `@.cursor/skills/<name>/SKILL.md`.
33+
Skills are defined in `.cursor/skills/` and provide reusable workflows that commands and other skills can invoke. They are also surfaced to the agent automatically and can be triggered directly.
3434

3535
### debug-edge
3636

3737
Compile, launch, and debug the Edge wallet app on an iOS simulator.
3838

3939
**Prerequisites**: Xcode, working directory `edge-react-gui`, MCP servers `xcodebuild` and `mobile-mcp`
4040

41-
**Workflow**: Install deps → Clean iOS → Prepare iOS → Start Metro → Build and launch → Login if needed
41+
**Workflow**: Install deps → Clean iOS build artifacts → Prepare iOS → Clean Xcode build → Start Metro bundler → Build and launch app → Log into test account if needed
4242

43-
**Tip**: For plugin repo debugging (edge-core-js, edge-currency-accountbased, edge-exchange-plugins, edge-currency-plugins), use `log.warn()` instead of `console.log` to see output in Metro logs.
43+
**Tip**: For plugin repo debugging (edge-core-js, edge-currency-accountbased, edge-exchange-plugins, edge-currency-plugins), use `log.warn()` instead of `console.log` to see output in Metro logs. Enable the corresponding `DEBUG_*` flag in `env.json` and run `yarn start` in the plugin repo for hot-reload.
4444

4545
### fix-code
4646

@@ -58,31 +58,29 @@ Address reviewer comments on a GitHub pull request.
5858

5959
**Usage**: Provide a GitHub PR URL or number.
6060

61-
**Workflow**: Collect reviewer comments → Create fix plan → Pause for user iteration → Implement fixes with fixup commits → Push with `--force-with-lease`
61+
**Workflow**: Fetch reviewer comments → Filter actionable items → Create fix plan in `/tmp` → Pause for user approval → Implement each fix as a fixup commit (checkout original commit, edit, cherry-pick remaining) → Push with `--force-with-lease`
6262

6363
**Constraints**: Does not auto-squash. Leaves fixup commits visible for reviewer.
6464

65-
### package-deps
66-
67-
Package local dependency repos and link them to edge-react-gui for testing.
65+
### gh-review
6866

69-
**Usage**: Specify dependency repos to package.
67+
Orchestrate an interactive GitHub PR review session using the `gh` CLI.
7068

71-
**Workflow**: `npm pack` → Rename with UTC timestamp → Copy to edge-react-gui → Update `package.json` reference
69+
**Prerequisites**: `gh` CLI installed and authenticated
7270

73-
### review-code
71+
**Usage**: Provide a PR reference (URL, number, or "current PR") and comment instructions.
7472

75-
Review code changes for quality and convention compliance.
73+
**Workflow**: Start or resume a pending review → Add inline comments interactively (single-line or multi-line) via GraphQL API → Present summary of all comments → Submit only after explicit user confirmation as APPROVE, COMMENT, or REQUEST_CHANGES
7674

77-
**Usage**: Provide a GitHub PR URL, PR number, local branch name, or "current branch".
75+
**Key detail**: Uses GraphQL `addPullRequestReviewThread` for incremental comments because the REST API returns 422 when a pending review already exists.
7876

79-
**Workflow**: Checkout code → Get diff → Launch review subagents (`review-react`, `review-errors`, `review-state`, etc.) → Compile findings → Save to `/tmp` → For PRs: submit inline comments via GitHub MCP
77+
### package-deps
8078

81-
---
79+
Package local dependency repos and link them to edge-react-gui for testing.
8280

83-
## Cursor Skills
81+
**Usage**: Specify dependency repos to package.
8482

85-
Skills are defined in `.cursor/skills/` and provide reusable workflows that commands and other skills can invoke. They are also surfaced to the agent automatically and can be triggered directly.
83+
**Workflow**: `npm pack` → Rename with UTC timestamp → Copy to edge-react-gui → Update `package.json` reference
8684

8785
### review-code
8886

@@ -94,56 +92,6 @@ Review code changes for quality and convention compliance. Supports both GitHub
9492

9593
---
9694

97-
### fix-pr
98-
99-
Address reviewer comments on a GitHub pull request.
100-
101-
**Usage**: Provide a GitHub PR URL or number.
102-
103-
**Workflow**: Fetch reviewer comments → Filter actionable items → Create fix plan in `/tmp` → Pause for user approval → Implement each fix as a fixup commit (checkout original commit, edit, cherry-pick remaining) → Push with `--force-with-lease`
104-
105-
**Constraints**: Does not auto-squash. Leaves fixup commits visible for reviewer.
106-
107-
---
108-
109-
### fix-code
110-
111-
Implement fixes from a plan document by editing code.
112-
113-
**Usage**: Provide a plan document path (typically generated by `fix-pr` or `review-code`).
114-
115-
**Workflow**: Parse plan → Edit files → Run `yarn precommit` → Present summary
116-
117-
**Constraints**: Does not commit or push. Leaves changes unstaged for user review.
118-
119-
---
120-
121-
### debug-edge
122-
123-
Compile, launch, and debug the Edge wallet app on an iOS simulator.
124-
125-
**Prerequisites**: Xcode, working directory `edge-react-gui`, MCP servers `xcodebuild` and `mobile-mcp`
126-
127-
**Workflow**: Install deps → Clean iOS build artifacts → Prepare iOS → Clean Xcode build → Start Metro bundler → Build and launch app → Log into test account if needed
128-
129-
**Tip**: For plugin repo debugging (edge-core-js, edge-currency-accountbased, edge-exchange-plugins, edge-currency-plugins), use `log.warn()` instead of `console.log` to see output in Metro logs. Enable the corresponding `DEBUG_*` flag in `env.json` and run `yarn start` in the plugin repo for hot-reload.
130-
131-
---
132-
133-
### gh-review
134-
135-
Orchestrate an interactive GitHub PR review session using the `gh` CLI.
136-
137-
**Prerequisites**: `gh` CLI installed and authenticated
138-
139-
**Usage**: Provide a PR reference (URL, number, or "current PR") and comment instructions.
140-
141-
**Workflow**: Start or resume a pending review → Add inline comments interactively (single-line or multi-line) via GraphQL API → Present summary of all comments → Submit only after explicit user confirmation as APPROVE, COMMENT, or REQUEST_CHANGES
142-
143-
**Key detail**: Uses GraphQL `addPullRequestReviewThread` for incremental comments because the REST API returns 422 when a pending review already exists.
144-
145-
---
146-
14795
## Best Practices
14896

14997
1. **Monitor Metro bundler** when debugging—JavaScript logs appear there

0 commit comments

Comments
 (0)