Skip to content

chore(skills): update Cargo.lock and README for skills version 0.2.0#81

Merged
sergiofilhowz merged 2 commits intomainfrom
feat/skills-registry
May 5, 2026
Merged

chore(skills): update Cargo.lock and README for skills version 0.2.0#81
sergiofilhowz merged 2 commits intomainfrom
feat/skills-registry

Conversation

@sergiofilhowz
Copy link
Copy Markdown
Contributor

@sergiofilhowz sergiofilhowz commented May 5, 2026

  • Updated the skills package version in Cargo.lock from 0.1.0 to 0.2.0.
  • Enhanced README with detailed validation rules for skill IDs and skills, including new URI structures and examples for nested skills.
  • Added new functionality for fetching skills with the skills::fetch_skill and skill::fetch methods, allowing for batched reads of skill resources.
  • Improved error handling and validation for URI parsing and registration scenarios.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for multi-segment, slash-delimited skill IDs with per-segment length constraints.
    • Introduced new URI addressing schemes for resource access (iii://fn/{path} for function delegation and nested skill paths).
    • Added skill::fetch tool for batched resource retrieval across multiple URIs.
    • Enabled hierarchical nested skills with depth-based indentation in listings.
  • Documentation

    • Updated skill ID validation rules and URI scheme documentation.
    • Expanded guides for nested skills, resource sections, and batched fetching.
  • Tests

    • Added comprehensive test coverage for URI parsing, nested skill hierarchies, and fetch operations.

- Updated the skills package version in Cargo.lock from 0.1.0 to 0.2.0.
- Enhanced README with detailed validation rules for skill IDs and skills, including new URI structures and examples for nested skills.
- Added new functionality for fetching skills with the `skills::fetch_skill` and `skill::fetch` methods, allowing for batched reads of skill resources.
- Improved error handling and validation for URI parsing and registration scenarios.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Warning

Rate limit exceeded

@sergiofilhowz has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 47 minutes and 19 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c30b2b54-48c3-42a7-b7e3-863e82e47fd8

📥 Commits

Reviewing files that changed from the base of the PR and between cf47b90 and f0e1570.

📒 Files selected for processing (1)
  • skills/Cargo.toml
📝 Walkthrough

Walkthrough

This PR introduces a multi-segment URI scheme for skills, replacing single-segment IDs with slash-delimited paths. It adds a new skill::fetch public alias for batched resource fetching, revises the ParsedUri type to remove skill_id from sections, and includes extensive test coverage and documentation reflecting a v0.2.0 transition.

Changes

Core URI and Fetch System Redesign

Layer / File(s) Summary
Data Model and Constants
skills/src/functions/skills.rs
Introduces ID_SEGMENT_MAX_LEN, ID_TOTAL_MAX_LEN, FN_PREFIX, and URI prefix constants; revises ParsedUri::Section to carry only function_id instead of both skill_id and function_id; adds public FetchSkillInput struct with uri and uris fields.
Validation Logic
skills/src/functions/skills.rs
Adds validate_id_segment to enforce per-segment constraints (max 64 chars, lowercase ASCII/digits/hyphens/underscores); updates validate_id to enforce total-length constraint (1024 chars), per-segment checks, and reserved-first-segment rule for "fn"; adds public validate_fetch_input to normalize and validate fetch URIs.
URI Parsing
skills/src/functions/skills.rs
Rewrites parse_uri to split input into segments, reject empty segments, route iii://fn/... to ParsedUri::Section { function_id } with segments joined by ::, and treat other paths as ParsedUri::Skill.
Resource Reading and Fetch Core
skills/src/functions/skills.rs
Updates read() to handle ParsedUri::Section by validating function_id, triggering the function via iii.trigger, and returning fetched content; implements core fetch logic to process multiple URIs and compose sections via validate_fetch_input.
Fetch Tool Registration and Public API
skills/src/functions/skills.rs
Adds register_fetch_skill and register_fetch_skill_public_alias (private) to wire skills::fetch_skill (always-hidden) and public alias skill::fetch into the registration flow; integration hooks fetch registration into register_all.
Templates, Index Rendering, and Metadata
skills/src/functions/skills.rs, skills/src/functions/mod.rs, skills/src/main.rs
Updates list_templates second description to reference function-path semantics; enhances render_index with richer header text and depth-based indentation for nested skills; updates log in mod.rs to reflect 7 skills, 1 skill, and 5 prompts functions; populates WorkerMetadata in main.rs and updates readiness log to 13 functions.
Test Infrastructure and Scenarios
skills/tests/steps/skills_fetch.rs, skills/tests/steps/skills_nested.rs, skills/tests/features/*
Adds new test step modules (skills_fetch, skills_nested) with cucumber bindings for seeding, fetching, triggering, and asserting nested skills and fetch operations; introduces feature files (skills_fetch.feature, skills_nested.feature) covering single/multiple URI fetch, validation, section resolution, nested depth handling, and indentation; updates existing features (markdown.feature, mcp_bridge.feature, skills_register.feature, skills_resources.feature) with new test scenarios for multi-segment IDs, URI parsing, function-backed sections, and fetch alias visibility.
Documentation
skills/README.md
Expands URI scheme documentation with four shape descriptions (index, body, nested skills, function-backed sections); details multi-segment ID rules (per-segment max 64 chars, total max 1024 chars, reserved "fn" first-segment); provides worked examples of deep skill trees, nested routers, section URIs, and function-backed content; updates fetch helper descriptions and public alias; includes v0.2.0 migration guidance.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Client as Client/iii Engine
    participant Fetch as skill::fetch Handler
    participant Validate as Validator
    participant Read as Resource Reader
    participant Trigger as Function Trigger

    User->>Client: Call skill::fetch with uri/uris
    Client->>Fetch: TriggerRequest(skill::fetch, payload)
    
    Fetch->>Validate: validate_fetch_input({uri, uris})
    Validate-->>Fetch: Vec<String> URIs (normalized)
    
    Fetch->>Fetch: Initialize output sections

    loop For each URI
        Fetch->>Read: parse_uri(uri)
        alt Skill URI (iii://{a}/{b}/...)
            Read-->>Fetch: ParsedUri::Skill(id)
            Fetch->>Read: read(Skill(id))
            Read-->>Fetch: Skill body
        else Section URI (iii://fn/{a}/{b}/...)
            Read-->>Fetch: ParsedUri::Section{function_id}
            Fetch->>Trigger: iii.trigger(function_id)
            Trigger-->>Fetch: Content (markdown/json)
        end
        Fetch->>Fetch: Append content to output sections
    end

    Fetch-->>Client: Composed output (sections joined by ---)
    Client-->>User: Fetch result
Loading
sequenceDiagram
    actor User
    participant Client as Client/iii Engine
    participant Resources as skills::resources-read Handler
    participant Reader as Resource Reader
    participant Trigger as Function Trigger

    User->>Client: Read iii://fn/{a}/{b}

    Client->>Resources: skills::resources-read(uri)
    Resources->>Reader: parse_uri(iii://fn/a/b)
    Reader-->>Resources: ParsedUri::Section{function_id: "a::b"}
    
    Resources->>Reader: validate_id("a::b")
    Reader-->>Resources: Valid ID
    
    Resources->>Trigger: iii.trigger(a::b)
    Trigger-->>Resources: Content{content: "...", mime: "..."}
    
    Resources-->>Client: Rendered content
    Client-->>User: Resource display
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • iii-hq/workers#70: Modifies the same skills/src/functions/skills.rs file and changes URI parsing, ParsedUri shape, and fetch/section resolution logic.

Poem

🐰 Slashes now divide our skills,
Nested paths on gentle hills,
Functions dance through fn's embrace,
Sections fetch at rapid pace!
From single stems to branching trees,
Skills now flow with greater ease. 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title references only Cargo.lock and README updates for v0.2.0, but the changeset includes substantial functional additions: new public APIs (FetchSkillInput, validate_fetch_input), ParsedUri enum changes, fetch tool implementation, and extensive test additions. Revise title to reflect the full scope, e.g., 'feat(skills): add fetch tools and multi-segment URI validation for v0.2.0' or 'refactor(skills): restructure URI model and add fetch functionality for v0.2.0'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/skills-registry

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.

@sergiofilhowz sergiofilhowz merged commit d0f25b9 into main May 5, 2026
6 checks passed
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