Conversation
Adds a skills/gcpath/ directory following the Agent Skills spec (agentskills.io), enabling agents to install and use gcpath via: bunx skills add github:tardigrde/gcpath --skill gcpath Includes SKILL.md (when-to-use guidance, all commands with examples, common workflows, gotchas) and references/commands.md (compact flag reference per command). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds documentation for a new Agent Skill Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
=======================================
Coverage 87.29% 87.29%
=======================================
Files 9 9
Lines 1786 1786
=======================================
Hits 1559 1559
Misses 227 227 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces documentation for gcpath, a CLI tool for navigating GCP resource hierarchies, including a main skill guide and a command reference. The review feedback identifies several missing flags and examples in the SKILL.md file for the tree, diagram, and find commands, and suggests clarifying the global API selection flags to ensure the documentation accurately reflects the tool's capabilities.
| ```bash | ||
| gcpath tree # full hierarchy tree | ||
| gcpath tree folders/123 # subtree from a folder | ||
| gcpath tree folders/123 -L 3 # limit depth | ||
| gcpath tree folders/123 -i # show resource names alongside display names | ||
| gcpath tree folders/123 --type project # only show projects | ||
| gcpath tree -y # skip confirmation for large loads | ||
| ``` |
There was a problem hiding this comment.
The documentation for the tree command is missing some available flags. According to src/gcpath/cli.py and references/commands.md, the tree command also supports --show-labels, --show-tags, --label KEY=VALUE, and --tag KEY=VALUE for displaying and filtering by metadata. It would be beneficial to include these in the examples to showcase the full capabilities of the command.
| ```bash | |
| gcpath tree # full hierarchy tree | |
| gcpath tree folders/123 # subtree from a folder | |
| gcpath tree folders/123 -L 3 # limit depth | |
| gcpath tree folders/123 -i # show resource names alongside display names | |
| gcpath tree folders/123 --type project # only show projects | |
| gcpath tree -y # skip confirmation for large loads | |
| ``` | |
| gcpath tree # full hierarchy tree | |
| gcpath tree folders/123 # subtree from a folder | |
| gcpath tree folders/123 -L 3 # limit depth | |
| gcpath tree folders/123 -i # show resource names alongside display names | |
| gcpath tree folders/123 --type project # only show projects | |
| gcpath tree -y # skip confirmation for large loads | |
| gcpath tree --label env=prod --show-labels # filter by label and show them |
| ```bash | ||
| gcpath diagram # Mermaid diagram of full hierarchy | ||
| gcpath diagram folders/123 # diagram of a subtree | ||
| gcpath diagram -f d2 # D2 format instead of Mermaid | ||
| gcpath diagram -o hierarchy.mmd # write to file | ||
| gcpath diagram folders/123 -L 2 # limit depth | ||
| ``` |
There was a problem hiding this comment.
The documentation for the diagram command is missing the --ids (-i) and --yes (-y) flags, which are available according to src/gcpath/cli.py and references/commands.md. Please add examples for these flags to provide complete documentation.
| ```bash | |
| gcpath diagram # Mermaid diagram of full hierarchy | |
| gcpath diagram folders/123 # diagram of a subtree | |
| gcpath diagram -f d2 # D2 format instead of Mermaid | |
| gcpath diagram -o hierarchy.mmd # write to file | |
| gcpath diagram folders/123 -L 2 # limit depth | |
| ``` | |
| gcpath diagram # Mermaid diagram of full hierarchy | |
| gcpath diagram folders/123 # diagram of a subtree | |
| gcpath diagram -f d2 # D2 format instead of Mermaid | |
| gcpath diagram -o hierarchy.mmd # write to file | |
| gcpath diagram folders/123 -L 2 # limit depth | |
| gcpath diagram folders/123 -i # include resource names in diagram | |
| gcpath diagram -y # skip confirmation for large loads |
| ```bash | ||
| gcpath find "data-*" # glob pattern, case-insensitive | ||
| gcpath find "*team*" folders/123 # scoped to a subtree | ||
| gcpath find "prod-*" --type project | ||
| gcpath find "*" --label env=production # find all labeled resources | ||
| ``` |
There was a problem hiding this comment.
The documentation for the find command is missing the --tag flag for filtering by GCP tags. This flag is available according to src/gcpath/cli.py and references/commands.md. Please add an example for it to ensure the documentation is complete.
| ```bash | |
| gcpath find "data-*" # glob pattern, case-insensitive | |
| gcpath find "*team*" folders/123 # scoped to a subtree | |
| gcpath find "prod-*" --type project | |
| gcpath find "*" --label env=production # find all labeled resources | |
| ``` | |
| gcpath find "data-*" # glob pattern, case-insensitive | |
| gcpath find "*team*" folders/123 # scoped to a subtree | |
| gcpath find "prod-*" --type project | |
| gcpath find "*" --label env=production # find all labeled resources | |
| gcpath find "*" --tag cost-center=eng # find all tagged resources |
| | `--json` | | Output as JSON | | ||
| | `--yaml` | | Output as YAML | | ||
| | `--force-refresh` | `-F` | Bypass cache, re-fetch from GCP API | | ||
| | `--no-use-asset-api` | `-U` | Use Resource Manager API instead of Cloud Asset API | |
There was a problem hiding this comment.
The documentation for the API selection flag could be more precise. The flag is a toggle: --use-asset-api (default) and --no-use-asset-api. The short forms are -u and -U respectively. The current documentation only mentions --no-use-asset-api and -U. While the "API Modes" table clarifies this, making the "Global Flags" table more complete would improve clarity.
| | `--no-use-asset-api` | `-U` | Use Resource Manager API instead of Cloud Asset API | | |
| | `--use-asset-api / --no-use-asset-api` | `-u / -U` | Use Cloud Asset API (default) or Resource Manager API | |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
skills/gcpath/references/commands.md (1)
37-42: Add language specifier to code block.The fenced code block should specify a language (e.g.,
bashorshell) for proper syntax highlighting and better rendering. This applies to all example code blocks in this file.📝 Proposed fix for this block
-``` +```bash gcpath ls gcpath ls folders/123As per static analysis hints, markdownlint MD040 rule requires language specifiers on fenced code blocks.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@skills/gcpath/references/commands.md` around lines 37 - 42, Add a language specifier (e.g., bash or shell) to the fenced code blocks containing the example gcpath commands so they comply with markdownlint MD040; locate the example block(s) that show commands like "gcpath ls", "gcpath ls folders/123", "gcpath ls folders/123 -R -L 2 --type project", and "gcpath ls -R --label env=prod --show-labels --json" and update the opening fence from ``` to ```bash (or ```shell) for each block.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@skills/gcpath/references/commands.md`:
- Around line 5-15: Add the missing global flag entry for --force-refresh (-F)
to the "Global Flags" table so it matches usages elsewhere and SKILL.md; update
the table row to include the flag name `--force-refresh / -F`, the short form
`-F`, a sensible default (false), and a concise description like "force refresh
/ bypass caches" so readers know it's available for all commands referenced in
commands.md.
In `@skills/gcpath/SKILL.md`:
- Around line 160-172: Update the global flags table to document both the
positive and negative forms of the asset-api flag consistently with commands.md:
replace the single `--no-use-asset-api` / `-U` entry with an entry that shows
both `--use-asset-api / --no-use-asset-api` and both short forms `-u / -U`, and
ensure the description matches the intent ("Use Resource Manager API instead of
Cloud Asset API" or inverse as appropriate). Edit the `--no-use-asset-api` /
`-U` row in the SKILL.md Global Flags table so it mirrors the flags and short
aliases shown in commands.md (`--use-asset-api / --no-use-asset-api` with `-u /
-U`) and keep the description aligned.
---
Nitpick comments:
In `@skills/gcpath/references/commands.md`:
- Around line 37-42: Add a language specifier (e.g., bash or shell) to the
fenced code blocks containing the example gcpath commands so they comply with
markdownlint MD040; locate the example block(s) that show commands like "gcpath
ls", "gcpath ls folders/123", "gcpath ls folders/123 -R -L 2 --type project",
and "gcpath ls -R --label env=prod --show-labels --json" and update the opening
fence from ``` to ```bash (or ```shell) for each block.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ed08be71-789e-460b-b9bc-d9603810716c
📒 Files selected for processing (2)
skills/gcpath/SKILL.mdskills/gcpath/references/commands.md
| ## Global Flags | ||
|
|
||
| Apply to every command (place before the subcommand): | ||
|
|
||
| | Flag | Short | Default | Description | | ||
| |------|-------|---------|-------------| | ||
| | `--entrypoint RESOURCE` | `-e` | config/none | Scope all commands to this resource | | ||
| | `--json` | | false | JSON output | | ||
| | `--yaml` | | false | YAML output | | ||
| | `--use-asset-api / --no-use-asset-api` | `-u / -U` | true (asset) | API backend | | ||
| | `--debug` | | false | Debug logging | |
There was a problem hiding this comment.
Missing --force-refresh in global flags table.
The --force-refresh / -F flag appears in multiple command sections (lines 33, 60, 83, 101, 120, 157) but is not listed in the global flags table. According to SKILL.md line 169, --force-refresh / -F is documented as a global flag. This inconsistency may confuse users about the flag's availability.
📝 Proposed fix to add --force-refresh to global flags
| `--use-asset-api / --no-use-asset-api` | `-u / -U` | true (asset) | API backend |
+| `--force-refresh` | `-F` | false | Bypass cache |
| `--debug` | | false | Debug logging |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills/gcpath/references/commands.md` around lines 5 - 15, Add the missing
global flag entry for --force-refresh (-F) to the "Global Flags" table so it
matches usages elsewhere and SKILL.md; update the table row to include the flag
name `--force-refresh / -F`, the short form `-F`, a sensible default (false),
and a concise description like "force refresh / bypass caches" so readers know
it's available for all commands referenced in commands.md.
| ## Global Flags | ||
|
|
||
| These apply to any command: | ||
|
|
||
| | Flag | Short | Description | | ||
| |------|-------|-------------| | ||
| | `--entrypoint RESOURCE` | `-e` | Default scope for this invocation | | ||
| | `--json` | | Output as JSON | | ||
| | `--yaml` | | Output as YAML | | ||
| | `--force-refresh` | `-F` | Bypass cache, re-fetch from GCP API | | ||
| | `--no-use-asset-api` | `-U` | Use Resource Manager API instead of Cloud Asset API | | ||
| | `--debug` | | Enable debug logging | | ||
|
|
There was a problem hiding this comment.
Inconsistent flag documentation between files.
Line 170 documents --no-use-asset-api / -U but does not mention the positive form --use-asset-api / -u. However, commands.md line 14 documents both forms: --use-asset-api / --no-use-asset-api with -u / -U. For consistency, both files should document the flag the same way.
📝 Proposed fix to align with commands.md
| `--force-refresh` | `-F` | Bypass cache, re-fetch from GCP API |
-| `--no-use-asset-api` | `-U` | Use Resource Manager API instead of Cloud Asset API |
+| `--use-asset-api / --no-use-asset-api` | `-u / -U` | Choose API backend (Asset API is default) |
| `--debug` | | Enable debug logging |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## Global Flags | |
| These apply to any command: | |
| | Flag | Short | Description | | |
| |------|-------|-------------| | |
| | `--entrypoint RESOURCE` | `-e` | Default scope for this invocation | | |
| | `--json` | | Output as JSON | | |
| | `--yaml` | | Output as YAML | | |
| | `--force-refresh` | `-F` | Bypass cache, re-fetch from GCP API | | |
| | `--no-use-asset-api` | `-U` | Use Resource Manager API instead of Cloud Asset API | | |
| | `--debug` | | Enable debug logging | | |
| ## Global Flags | |
| These apply to any command: | |
| | Flag | Short | Description | | |
| |------|-------|-------------| | |
| | `--entrypoint RESOURCE` | `-e` | Default scope for this invocation | | |
| | `--json` | | Output as JSON | | |
| | `--yaml` | | Output as YAML | | |
| | `--force-refresh` | `-F` | Bypass cache, re-fetch from GCP API | | |
| | `--use-asset-api / --no-use-asset-api` | `-u / -U` | Choose API backend (Asset API is default) | | |
| | `--debug` | | Enable debug logging | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills/gcpath/SKILL.md` around lines 160 - 172, Update the global flags table
to document both the positive and negative forms of the asset-api flag
consistently with commands.md: replace the single `--no-use-asset-api` / `-U`
entry with an entry that shows both `--use-asset-api / --no-use-asset-api` and
both short forms `-u / -U`, and ensure the description matches the intent ("Use
Resource Manager API instead of Cloud Asset API" or inverse as appropriate).
Edit the `--no-use-asset-api` / `-U` row in the SKILL.md Global Flags table so
it mirrors the flags and short aliases shown in commands.md (`--use-asset-api /
--no-use-asset-api` with `-u / -U`) and keep the description aligned.
Adds a dedicated section explaining the bundled agent skill and how to install it via bunx/npx, plus a one-liner callout in the "Why use gcpath" bullet list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add allowed-tools: Bash(gcpath:*) Bash(uvx gcpath:*) - Add compatibility, license, and metadata fields - Trim SKILL.md from 258 to 143 lines: collapse verbose commands section into common workflows + key flags table, move full flag reference to references/commands.md with explicit load trigger - Keep gotchas inline per best-practices guidance Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|



Summary
skills/gcpath/following the Agent Skills spec, so AI agents can install and use gcpath nativelySKILL.mdcovers when-to-use triggers, all CLI commands with examples, 7 common workflow recipes, API modes, caching, and gotchasreferences/commands.mdis a compact per-command flag table for quick agent lookupInstall
Once merged, agents can install the skill via:
Test plan
bunx skills add github:tardigrde/gcpath --skill gcpath --listshows the skilldescriptionaccurately describes when an agent should activate the skillreferences/commands.mdmatch the actual CLI flags insrc/gcpath/cli.py🤖 Generated with Claude Code
Summary by CodeRabbit