Skip to content

feat: add agent skills for package registry queries and AI tool integration#39

Merged
oritwoen merged 6 commits intomainfrom
feat/skills
Mar 13, 2026
Merged

feat: add agent skills for package registry queries and AI tool integration#39
oritwoen merged 6 commits intomainfrom
feat/skills

Conversation

@oritwoen
Copy link
Owner

Summary

Two agent skills following the agentskills.io spec for skills.sh:

  • regxa - teaches agents how to query package registries using regxa's CLI and library API. Covers all 6 ecosystems, PURL format, caching, helpers.
  • regxa-ai-tool - teaches agents how to integrate regxa's packageTool into Vercel AI SDK applications. Covers all 5 operations (package, versions, dependencies, maintainers, bulk).

Both skills use progressive disclosure - lean SKILL.md files with JiT-loaded references for detailed type contracts, PURL encoding rules, and common mistakes.

Test plan

  • Skill directory names match frontmatter name fields
  • SKILL.md files under 500 lines (main skill: ~120, ai-tool: ~100)
  • References are flat (one level deep)
  • Instructions use third-person imperative
  • No human-centric files (README, CHANGELOG)
  • Code examples match current regxa API

Two skills following the agentskills.io spec:
- regxa: CLI and library API for querying package registries
- regxa-ai-tool: Vercel AI SDK integration with packageTool
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7efe4e27-97dd-4d55-9d4c-dd4dfbc89137

📥 Commits

Reviewing files that changed from the base of the PR and between cfb1c5f and cfbe781.

📒 Files selected for processing (2)
  • skills/regxa-ai-tool/SKILL.md
  • skills/regxa/SKILL.md
📜 Recent review details
⏰ 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). (1)
  • GitHub Check: cubic · AI code reviewer
🧰 Additional context used
🧠 Learnings (17)
📚 Learning: 2026-03-10T07:36:38.679Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/core/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:38.679Z
Learning: Applies to src/core/**/*.ts : Throw typed errors (InvalidPURLError, NotFoundError, RateLimitError) instead of plain Error in core flows

Applied to files:

  • skills/regxa-ai-tool/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : PURL input resolution and optional `pkg:` prefix normalization should be implemented in `src/commands/shared.ts`

Applied to files:

  • skills/regxa-ai-tool/SKILL.md
  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Do not mutate cache internals directly from commands; use the cache API instead

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:22.301Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/cache/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:22.301Z
Learning: Applies to src/cache/storage.ts : Storage lifecycle, global storage configuration, and disposal/clear hooks should be implemented in `src/cache/storage.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Shared argument flags (`--json` and `--no-cache`) should be defined and handled in `src/commands/shared.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:54.862Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: test/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:54.862Z
Learning: Applies to test/unit/{lockfile,cached-registry}.test.ts : Cache behavior tests should be located in `test/unit/lockfile.test.ts` and `test/unit/cached-registry.test.ts` for freshness, TTL, integrity, and wrapper behavior validation

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:22.301Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/cache/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:22.301Z
Learning: Applies to src/cache/cached-registry.ts : Cache wrapper behavior and read-through/write-through wrapper for `Registry` should be implemented in `src/cache/cached-registry.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:22.301Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/cache/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:22.301Z
Learning: Applies to src/cache/**/*.ts : Keep cache-key format stable; lockfile compatibility depends on maintaining a consistent key format

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:03.586Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:03.586Z
Learning: Bulk fetch helpers should intentionally skip failed packages instead of failing all

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:46.164Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/registries/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:46.164Z
Learning: Applies to src/registries/*.ts : Each registry adapter in `src/registries/` must expose `ecosystem`, `fetchPackage`, `fetchVersions`, `fetchDependencies`, `fetchMaintainers`, and `urls` exports

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:46.164Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/registries/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:46.164Z
Learning: Applies to src/registries/*.ts : Keep per-registry API quirks isolated to that adapter file before normalizing to shared types

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:46.164Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/registries/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:46.164Z
Learning: Use `npm.ts` as a reference implementation pattern when building new registry adapters

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Maintain parity between human-readable and `--json` output branches for new command output

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Keep command output in dual-mode supporting both human-readable and `--json` formats

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:54.862Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: test/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:54.862Z
Learning: Applies to test/unit/purl.test.ts : PURL contract tests should be located in `test/unit/purl.test.ts` for parse/build validation

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Do not reimplement PURL parsing in individual command files; use the shared implementation from `src/commands/shared.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Do not bypass shared argument definitions for common flags; use definitions from `src/commands/shared.ts`

Applied to files:

  • skills/regxa/SKILL.md
🔇 Additional comments (6)
skills/regxa-ai-tool/SKILL.md (4)

105-105: The referenced file exists at skills/regxa-ai-tool/references/purl-cheatsheet.md. The link is valid.


26-26: The regxa/ai subpath export is correctly defined in package.json with proper type definitions and import paths. The example code works as written.


65-65: No issues found. The documentation accurately reflects the implementation—fetchDependenciesFromPURL validates that PURLs include a version and throws InvalidPURLError with message "must include a version for dependency lookup" when missing. Behavior is tested and enforced as documented.


81-81: The numbers are correct. DEFAULT_CONCURRENCY is 15 (src/helpers.ts:49), max PURL array is 50 (src/ai.ts:38), and failed lookups do get silently caught (src/helpers.ts catch block). No stale docs here.

skills/regxa/SKILL.md (2)

32-32: No issue here. The file references/purl-guide.md exists at the correct relative path from skills/regxa/SKILL.md. Link works as written.


159-159: File reference is validapi-reference.md exists at the expected location, so users can access it.


📝 Walkthrough

Walkthrough

Adds documentation and agent manifests for the regxa package-registry client and its Vercel AI SDK integration: SKILL docs, PURL guides and cheatsheet, API reference defining package/version/dependency/maintainer shapes and helpers, plus two agent YAML manifests for regxa and the regxa AI tool.

Changes

Cohort / File(s) Summary
regxa AI Tool SKILL
skills/regxa-ai-tool/SKILL.md
New AI tool documentation describing packageTool operations (package, versions, dependencies, maintainers, bulk-packages), input/output schemas, streaming usage, error types, retry/backoff behavior, and PURL quick reference.
regxa AI Tool references
skills/regxa-ai-tool/references/purl-cheatsheet.md
Added PURL cheatsheet with ecosystem examples, scoped-package encoding rules, common mistakes, and notes on which operations require versions.
regxa Core SKILL
skills/regxa/SKILL.md
New documentation for the universal registry client: PURL formats, CLI/library usage, cached queries, helper utilities, and error handling.
API reference & PURL guide
skills/regxa/references/api-reference.md, skills/regxa/references/purl-guide.md
Added API reference defining Package/Version/Dependency/Maintainer shapes and helper signatures (selectVersion, bulkFetchPackages, resolveDocsUrl, resolveReadmeUrl), plus a comprehensive PURL guide with parsing/build examples and normalization rules.
Agent manifests
skills/regxa-ai-tool/agents/openai.yaml, skills/regxa/agents/openai.yaml
Added two agent YAMLs: one for the regxa AI tool (disallows implicit invocation) and one for the regxa agent (allows implicit invocation).

Sequence Diagram(s)

(omitted — changes are documentation and agent manifests; no new multi-component control flow requiring a sequence diagram)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • aeitwoen
  • cubic-dev-ai

Poem

📦 PURLs penned, modules now aligned,
Docs and cheatsheets tidy the find,
Agents added, prompts set right,
Registry maps bring clarity bright,
Quick wins for package-hungry minds.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive No linked issues found in PR context; unable to assess whether changes address specific tickets. Link relevant GitHub issues if this PR resolves or relates to specific feature requests or bug reports.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main addition—two new agent skills for package registry queries and AI tool integration, which matches the changeset's primary objective.
Description check ✅ Passed The description clearly relates to the changeset, explaining both skills, their scope, progressive disclosure design, and verification against the test plan.
Out of Scope Changes check ✅ Passed All changes are documentation and agent configuration files for the two new skills; no out-of-scope logic or unrelated alterations detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/skills
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/skills
📝 Coding Plan
  • Generate coding plan for human review comments

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

@coderabbitai coderabbitai bot requested a review from aeitwoen March 13, 2026 18:51
@codeant-ai
Copy link

codeant-ai bot commented Mar 13, 2026

Sequence Diagram

This PR adds two agent skills that guide how package registry queries are performed through regxa, either via direct regxa usage or through AI SDK tool integration. The flow emphasizes progressive disclosure, where detailed references are loaded only when needed before executing normalized registry operations.

sequenceDiagram
    participant Agent
    participant SkillsRuntime
    participant RegxaSkill
    participant AIToolSkill
    participant Regxa
    participant Registry

    Agent->>SkillsRuntime: Request package registry query guidance
    alt Direct regxa usage
        SkillsRuntime->>RegxaSkill: Load core regxa skill
        Agent->>SkillsRuntime: Load PURL and API reference on demand
        Agent->>Regxa: Run regxa operation with PURL
    else AI SDK integration
        SkillsRuntime->>AIToolSkill: Load AI tool integration skill
        Agent->>SkillsRuntime: Load PURL cheatsheet on demand
        Agent->>Regxa: Run package tool operation with PURL
    end
    Regxa->>Registry: Query package data across ecosystem
    Registry-->>Regxa: Return package registry response
    Regxa-->>Agent: Return normalized structured result
Loading

Generated by CodeAnt AI

@coderabbitai coderabbitai bot added the enhancement New feature or request label Mar 13, 2026
Adds agents/openai.yaml to both skills with interface metadata
and policy config for Codex skill discovery.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 143ec97342

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

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

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

Auto-approved: Documentation-only change adding AI agent skills and reference guides; no impact on core source code, business logic, or infrastructure.

Copy link

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

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

Auto-approved: This PR adds documentation and configuration files for AI agent skills. It does not modify any existing source code, business logic, or infrastructure.

…dling description

- Remove nonexistent per-ecosystem cache clear example
- Clarify shorthand PURLs are CLI-only, library requires pkg: prefix
- Document that packageTool throws exceptions, not structured errors
Copy link

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

Choose a reason for hiding this comment

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

2 issues found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="skills/regxa-ai-tool/SKILL.md">

<violation number="1" location="skills/regxa-ai-tool/SKILL.md:115">
P2: This says the agent can self-correct after a tool error, but the examples here are single-step AI SDK calls. Without `stopWhen` or `ToolLoopAgent`, the model never gets another turn to recover from that failure.</violation>
</file>

<file name="skills/regxa/SKILL.md">

<violation number="1" location="skills/regxa/SKILL.md:30">
P2: This line overstates the contract. Only the PURL-based helpers require `pkg:` - the lower-level registry API later in this skill takes bare package names.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link

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

Choose a reason for hiding this comment

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

10 issues found across 5 files

Confidence score: 3/5

  • Some risk remains because skills/regxa-ai-tool/SKILL.md currently describes packageTool behavior that does not match src/ai.ts; without try/catch, invalid PURLs, not-found, or rate-limit errors can bubble up to AI SDK callers and cause user-facing failures.
  • Several high-confidence docs examples are inaccurate in skills/regxa/SKILL.md and skills/regxa/references/purl-guide.md (for example shorthand PURLs without pkg: for library APIs, unsupported cache command/options), which can lead to immediate runtime errors or incorrect CLI expectations.
  • This looks more like correctness/documentation drift than a broad code-architecture risk, so it may still be mergeable after targeted fixes to examples and claims.
  • Pay close attention to skills/regxa-ai-tool/SKILL.md, skills/regxa/SKILL.md, and skills/regxa/references/purl-guide.md - they contain the highest-impact mismatches that could mislead users into failing calls or non-working commands.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="skills/regxa-ai-tool/SKILL.md">

<violation number="1" location="skills/regxa-ai-tool/SKILL.md:13">
P2: This install command is missing `zod`, which `regxa/ai` imports directly.</violation>

<violation number="2" location="skills/regxa-ai-tool/SKILL.md:26">
P2: This example calls `openai()` without importing it, so the streaming snippet does not compile as written.</violation>

<violation number="3" location="skills/regxa-ai-tool/SKILL.md:60">
P2: The documented dependency `scope` values are wrong here - regxa returns `development`, not `dev`, and it can also return `optional`.</violation>

<violation number="4" location="skills/regxa-ai-tool/SKILL.md:105">
P1: This is wrong - `packageTool` in `src/ai.ts` returns helper calls directly without a try/catch, so invalid PURLs, not-found, and rate-limit failures propagate as thrown errors to the AI SDK caller. Agents following this guidance will skip exception handling and crash on normal lookup failures. Should state that errors are thrown and callers need to handle them (or the AI SDK's error handling kicks in).</violation>
</file>

<file name="skills/regxa/references/purl-guide.md">

<violation number="1" location="skills/regxa/references/purl-guide.md:58">
P2: This makes shorthand sound universal, but only the CLI auto-prefixes `pkg:`. Library calls like `parsePURL("npm/lodash")` still throw.</violation>
</file>

<file name="skills/regxa/SKILL.md">

<violation number="1" location="skills/regxa/SKILL.md:27">
P2: This makes shorthand look valid for the library API, but only the CLI adds the missing `pkg:` prefix. Using `npm/lodash` with `fetch*FromPURL` will throw `InvalidPURLError`.</violation>

<violation number="2" location="skills/regxa/SKILL.md:65">
P2: `regxa cache clear npm` is a made-up command. `clear` only wipes the entire cache, so this example points agents at a feature that isn't there.</violation>

<violation number="3" location="skills/regxa/SKILL.md:68">
P2: This overstates the CLI. The query commands support `--json` and `--no-cache`, but the cache subcommands don't, so agents will expect JSON output that isn't implemented.</violation>

<violation number="4" location="skills/regxa/SKILL.md:104">
P2: `bulkFetchPackages` itself is not capped at 50. That limit only exists in the AI tool schema, so this comment teaches the wrong contract for the library helper.</violation>

<violation number="5" location="skills/regxa/SKILL.md:153">
P2: `registry` is undefined here. The example above created `npm`, so this snippet won't run if someone copies it as written.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant Agent as AI Agent (Vercel AI SDK)
    participant Tool as NEW: regxa/ai (packageTool)
    participant Lib as regxa (Library Core)
    participant Cache as CachedRegistry (Disk/Mem)
    participant Registry as External Registry (npm/PyPI/etc)

    Note over Agent,Registry: Runtime Flow for regxa AI Tool Integration

    Agent->>Tool: NEW: toolCall({ operation, purl })
    Note right of Tool: Operations: package, versions,<br/>dependencies, maintainers, bulk

    Tool->>Lib: NEW: parsePURL(purl)
    Lib->>Lib: Normalize name (e.g. PyPI case/hyphen)
    Lib-->>Tool: Parsed PURL Object

    Tool->>Lib: NEW: fetch[Operation]FromPURL(purl)
    
    Lib->>Cache: CHANGED: check cache entry
    alt Cache Miss or --no-cache
        Lib->>Registry: HTTP GET (Registry Endpoint)
        Note right of Registry: Includes User-Agent & <br/>Exponential Backoff
        
        alt 429 Rate Limited
            Registry-->>Lib: Error
            Lib->>Lib: Retry logic
        else 200 OK
            Registry-->>Lib: Raw Ecosystem JSON
        end
        
        Lib->>Lib: NEW: Map to normalized schema
        Lib->>Cache: Store normalized result
    else Cache Hit
        Cache-->>Lib: Return cached data
    end

    Lib-->>Tool: Normalized Data Object
    
    opt operation == "dependencies"
        Tool->>Tool: Validate version presence in PURL
    end

    Tool-->>Agent: Structured Tool Result
    Note left of Agent: Agent processes metadata<br/>or corrects PURL on error
Loading

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
skills/regxa/SKILL.md (1)

17-19: Missing language identifier on code block.

Static analysis flagged this. Adding text or plaintext satisfies linters and helps syntax highlighters:

Suggested fix
-```
+```text
 pkg:<type>/<name>@<version>
-```
+```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/regxa/SKILL.md` around lines 17 - 19, Add a language identifier to the
fenced code block that contains the package pattern (the block with
"pkg:<type>/<name>@<version>") so linters and highlighters recognize it; update
the opening fence from ``` to ```text (or ```plaintext) while leaving the
content unchanged.
skills/regxa/references/purl-guide.md (1)

7-9: Same language identifier issue.

Consistency with the main SKILL.md would be nice:

Suggested fix
-```
+```text
 pkg:<type>/<namespace>/<name>@<version>?<qualifiers>#<subpath>
-```
+```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/regxa/references/purl-guide.md` around lines 7 - 9, The code block
containing the purl pattern
"pkg:<type>/<namespace>/<name>@<version>?<qualifiers>#<subpath>" uses a plain
triple-backtick fence; update the opening fence to include the language
identifier by replacing ``` with ```text (leave the closing ``` as-is) so the
block matches the same language tag used in SKILL.md and keeps rendering
consistent.
skills/regxa-ai-tool/SKILL.md (1)

91-95: Missing await on streamText?

Looking at Vercel AI SDK patterns, streamText returns a promise. This might work because you're only accessing result.textStream later, but the explicit await matches line 28's pattern with generateText and avoids confusion:

const result = await streamText({

Not a runtime bug since textStream access likely awaits internally, but inconsistent with the generateText example above.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/regxa-ai-tool/SKILL.md` around lines 91 - 95, The assignment to result
from streamText should be awaited for consistency with generateText and to
ensure the Promise resolves before accessing result.textStream; update the call
to await streamText(...) where result is declared (and make the enclosing
function async if it isn’t), keeping the same options (model: openai("gpt-4o"),
tools: { package: packageTool }, prompt: "...") so that result and
result.textStream are accessed from the resolved value.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@skills/regxa-ai-tool/SKILL.md`:
- Around line 91-95: The assignment to result from streamText should be awaited
for consistency with generateText and to ensure the Promise resolves before
accessing result.textStream; update the call to await streamText(...) where
result is declared (and make the enclosing function async if it isn’t), keeping
the same options (model: openai("gpt-4o"), tools: { package: packageTool },
prompt: "...") so that result and result.textStream are accessed from the
resolved value.

In `@skills/regxa/references/purl-guide.md`:
- Around line 7-9: The code block containing the purl pattern
"pkg:<type>/<namespace>/<name>@<version>?<qualifiers>#<subpath>" uses a plain
triple-backtick fence; update the opening fence to include the language
identifier by replacing ``` with ```text (leave the closing ``` as-is) so the
block matches the same language tag used in SKILL.md and keeps rendering
consistent.

In `@skills/regxa/SKILL.md`:
- Around line 17-19: Add a language identifier to the fenced code block that
contains the package pattern (the block with "pkg:<type>/<name>@<version>") so
linters and highlighters recognize it; update the opening fence from ``` to
```text (or ```plaintext) while leaving the content unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: deb4f933-a731-48db-99dc-1860ca1677fc

📥 Commits

Reviewing files that changed from the base of the PR and between 143ec97 and 0912a5d.

📒 Files selected for processing (5)
  • skills/regxa-ai-tool/SKILL.md
  • skills/regxa-ai-tool/agents/openai.yaml
  • skills/regxa/SKILL.md
  • skills/regxa/agents/openai.yaml
  • skills/regxa/references/purl-guide.md
✅ Files skipped from review due to trivial changes (1)
  • skills/regxa/agents/openai.yaml
📜 Review details
⏰ 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). (1)
  • GitHub Check: cubic · AI code reviewer
🧰 Additional context used
🧠 Learnings (16)
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : PURL input resolution and optional `pkg:` prefix normalization should be implemented in `src/commands/shared.ts`

Applied to files:

  • skills/regxa/references/purl-guide.md
📚 Learning: 2026-03-10T07:36:38.679Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/core/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:38.679Z
Learning: No duplicate PURL parsing utilities outside purl.ts

Applied to files:

  • skills/regxa/references/purl-guide.md
📚 Learning: 2026-03-10T07:36:54.862Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: test/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:54.862Z
Learning: Applies to test/unit/purl.test.ts : PURL contract tests should be located in `test/unit/purl.test.ts` for parse/build validation

Applied to files:

  • skills/regxa/references/purl-guide.md
📚 Learning: 2026-03-10T07:36:38.679Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/core/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:38.679Z
Learning: PURL parse and build behavior is the single source of truth for validation and normalization

Applied to files:

  • skills/regxa/references/purl-guide.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Do not reimplement PURL parsing in individual command files; use the shared implementation from `src/commands/shared.ts`

Applied to files:

  • skills/regxa/references/purl-guide.md
📚 Learning: 2026-03-10T07:36:03.586Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:03.586Z
Learning: Applies to src/**/*.ts : Do not parse PURLs outside `src/core/purl.ts`; call `createFromPURL` or `parsePURL` instead

Applied to files:

  • skills/regxa/references/purl-guide.md
📚 Learning: 2026-03-10T07:36:12.605Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:12.605Z
Learning: Applies to src/{commands,helpers}/**/*.ts : Route all parsing logic through `createFromPURL` instead of duplicating in commands or helpers

Applied to files:

  • skills/regxa/references/purl-guide.md
📚 Learning: 2026-03-10T07:36:12.605Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:12.605Z
Learning: Applies to src/helpers.ts : Wrap `createFromPURL` when adding convenience API in `src/helpers.ts` and preserve normalization path

Applied to files:

  • skills/regxa/references/purl-guide.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Do not mutate cache internals directly from commands; use the cache API instead

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:22.301Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/cache/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:22.301Z
Learning: Applies to src/cache/storage.ts : Storage lifecycle, global storage configuration, and disposal/clear hooks should be implemented in `src/cache/storage.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Shared argument flags (`--json` and `--no-cache`) should be defined and handled in `src/commands/shared.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:54.862Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: test/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:54.862Z
Learning: Applies to test/unit/{lockfile,cached-registry}.test.ts : Cache behavior tests should be located in `test/unit/lockfile.test.ts` and `test/unit/cached-registry.test.ts` for freshness, TTL, integrity, and wrapper behavior validation

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:22.301Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/cache/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:22.301Z
Learning: Applies to src/cache/cached-registry.ts : Cache wrapper behavior and read-through/write-through wrapper for `Registry` should be implemented in `src/cache/cached-registry.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:22.301Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/cache/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:22.301Z
Learning: Applies to src/cache/**/*.ts : Keep cache-key format stable; lockfile compatibility depends on maintaining a consistent key format

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:46.164Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/registries/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:46.164Z
Learning: Applies to src/registries/*.ts : Each registry adapter in `src/registries/` must expose `ecosystem`, `fetchPackage`, `fetchVersions`, `fetchDependencies`, `fetchMaintainers`, and `urls` exports

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:38.679Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/core/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:38.679Z
Learning: Applies to src/core/**/*.ts : Throw typed errors (InvalidPURLError, NotFoundError, RateLimitError) instead of plain Error in core flows

Applied to files:

  • skills/regxa-ai-tool/SKILL.md
🪛 markdownlint-cli2 (0.21.0)
skills/regxa/SKILL.md

[warning] 7-7: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 19-19: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 29-29: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 38-38: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 60-60: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 80-80: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (5)
skills/regxa-ai-tool/agents/openai.yaml (1)

1-12: Looks good.

Clean manifest structure. The dependency on regxa tool and allow_implicit_invocation: false policy are sensible defaults for a tool that should be explicitly invoked.

skills/regxa/SKILL.md (1)

1-167: Solid documentation structure.

Progressive disclosure pattern works well: quick-start CLI/library examples up front, references linked for deep dives. Error table at the end is helpful.

skills/regxa/references/purl-guide.md (1)

1-101: Comprehensive PURL reference.

Good coverage of edge cases: scoped packages, encoding rules, normalization differences across ecosystems. The buildPURL/parsePURL examples showing encode/decode symmetry are helpful.

skills/regxa-ai-tool/SKILL.md (2)

1-115: Good AI tool integration guide.

Clear progression: install → register → operations → streaming → errors. The discriminated union operation docs with JSON examples are exactly what an LLM agent would need to understand the tool schema.


21-26: Subpath export is correctly configured.

The regxa/ai import path is properly set up in package.json with both types and import fields, so this won't break at runtime.

			> Likely an incorrect or invalid review comment.

- Fix dependency scope values (development not dev, add optional)
- Add missing openai import in streaming example
- Clarify maxSteps requirement for self-correction
- Distinguish PURL helpers vs registry API for pkg: prefix
- Remove incorrect 50-cap comment on bulkFetchPackages
- Fix undefined registry variable in helper example
- Limit --json/--no-cache docs to query commands only
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/regxa/SKILL.md`:
- Around line 17-19: The fenced code block containing the literal text
"pkg:<type>/<name>@<version>" should include a language tag to satisfy
markdownlint (MD040); change the block start from ``` to ```text (or ```bash if
preferred) so it becomes ```text followed by pkg:<type>/<name>@<version> and
then ``` to close.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8510f645-1108-426f-8c72-09ffd04a3f68

📥 Commits

Reviewing files that changed from the base of the PR and between 0912a5d and cfb1c5f.

📒 Files selected for processing (2)
  • skills/regxa-ai-tool/SKILL.md
  • skills/regxa/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/regxa-ai-tool/SKILL.md
📜 Review details
⏰ 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). (1)
  • GitHub Check: cubic · AI code reviewer
🧰 Additional context used
🧠 Learnings (19)
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Do not mutate cache internals directly from commands; use the cache API instead

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:22.301Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/cache/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:22.301Z
Learning: Applies to src/cache/storage.ts : Storage lifecycle, global storage configuration, and disposal/clear hooks should be implemented in `src/cache/storage.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Shared argument flags (`--json` and `--no-cache`) should be defined and handled in `src/commands/shared.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:54.862Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: test/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:54.862Z
Learning: Applies to test/unit/{lockfile,cached-registry}.test.ts : Cache behavior tests should be located in `test/unit/lockfile.test.ts` and `test/unit/cached-registry.test.ts` for freshness, TTL, integrity, and wrapper behavior validation

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:22.301Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/cache/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:22.301Z
Learning: Applies to src/cache/cached-registry.ts : Cache wrapper behavior and read-through/write-through wrapper for `Registry` should be implemented in `src/cache/cached-registry.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:22.301Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/cache/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:22.301Z
Learning: Applies to src/cache/**/*.ts : Keep cache-key format stable; lockfile compatibility depends on maintaining a consistent key format

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : PURL input resolution and optional `pkg:` prefix normalization should be implemented in `src/commands/shared.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:03.586Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:03.586Z
Learning: Bulk fetch helpers should intentionally skip failed packages instead of failing all

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:46.164Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/registries/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:46.164Z
Learning: Applies to src/registries/*.ts : Each registry adapter in `src/registries/` must expose `ecosystem`, `fetchPackage`, `fetchVersions`, `fetchDependencies`, `fetchMaintainers`, and `urls` exports

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:46.164Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/registries/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:46.164Z
Learning: Use `npm.ts` as a reference implementation pattern when building new registry adapters

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:46.164Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/registries/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:46.164Z
Learning: Applies to src/registries/*.ts : Keep per-registry API quirks isolated to that adapter file before normalizing to shared types

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:03.586Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:03.586Z
Learning: Applies to src/registries/**/*.ts : Do not hardcode ecosystem registries using switch logic; use plugin-like registration factories instead

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Maintain parity between human-readable and `--json` output branches for new command output

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Keep command output in dual-mode supporting both human-readable and `--json` formats

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:29.354Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/commands/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:29.354Z
Learning: Applies to src/commands/**/*.ts : Do not reimplement PURL parsing in individual command files; use the shared implementation from `src/commands/shared.ts`

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:03.586Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:03.586Z
Learning: Applies to src/**/*.ts : Do not parse PURLs outside `src/core/purl.ts`; call `createFromPURL` or `parsePURL` instead

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:12.605Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:12.605Z
Learning: Applies to src/{commands,helpers}/**/*.ts : Route all parsing logic through `createFromPURL` instead of duplicating in commands or helpers

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:54.862Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: test/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:54.862Z
Learning: Applies to test/unit/purl.test.ts : PURL contract tests should be located in `test/unit/purl.test.ts` for parse/build validation

Applied to files:

  • skills/regxa/SKILL.md
📚 Learning: 2026-03-10T07:36:38.679Z
Learnt from: CR
Repo: oritwoen/regxa PR: 0
File: src/core/AGENTS.md:0-0
Timestamp: 2026-03-10T07:36:38.679Z
Learning: No duplicate PURL parsing utilities outside purl.ts

Applied to files:

  • skills/regxa/SKILL.md
🪛 markdownlint-cli2 (0.21.0)
skills/regxa/SKILL.md

[warning] 17-17: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

Copy link

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

Choose a reason for hiding this comment

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

2 issues found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="skills/regxa-ai-tool/SKILL.md">

<violation number="1" location="skills/regxa-ai-tool/SKILL.md:116">
P2: This line is describing the wrong AI SDK behavior. Current AI SDK tool loops use `stopWhen`, and tool failures show up as `tool-error` parts instead of being thrown back to the caller in normal `generateText` or `streamText` usage.</violation>
</file>

<file name="skills/regxa/SKILL.md">

<violation number="1" location="skills/regxa/SKILL.md:155">
P3: This example uses `npm.urls()` without defining `npm`, so the snippet fails if someone copies it as shown.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link

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

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

Auto-approved: Additive documentation and configuration for new agent skills; no impact on existing code or infrastructure.

@oritwoen oritwoen self-assigned this Mar 13, 2026
@oritwoen oritwoen merged commit a1ac2e6 into main Mar 13, 2026
3 checks passed
@oritwoen oritwoen deleted the feat/skills branch March 13, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant