Quickstart: Integrated Skills β Single Source, Chat Commands, Skill Hubs
Feature: 097-skills-middleware-integration | Date: 2026-03-27
Purposeβ
Short validation scenarios to verify the feature works end-to-end after implementation. These align with the specβs acceptance scenarios and success criteria.
Prerequisitesβ
- Backend (supervisor) and UI running; MongoDB configured.
- At least one skill in the central catalog (from the default store, from the
agent_skillsprojection /source: agent_skills, or from a hub). - Optional: One registered GitHub skill hub with at least one SKILL.md in the agreed path.
Scenario 1: Single source β UI and assistant see same skillsβ
- Open the skills experience in the UI (e.g.
/skillspage or gallery). - Note the list of skills shown.
- In chat, type
/skillsand submit. - Expect: The list shown in chat matches the list on the skills page (same ids and names; order may differ but set is the same).
- Expect: No βrun skillsβ or βRun in Chatβ action or button in the chat window; skill use is via the assistant and the shared catalog.
Scenario 2: /skills command in chatβ
- Open a conversation in the chat window.
- Type exactly
/skills(or the agreed command) and send. - Expect: The UI does not send this as a normal user message; instead it shows the list of available skills in the chat (e.g. as a system or bot message).
- Send a normal message (e.g. βWhat can you do?β).
- Expect: The skills list is not shown automatically; only when the user invokes the command.
- If the catalog is empty: invoke
/skillsand expect a clear message like βNo skills availableβ rather than an error or blank failure.
Scenario 3: Skill hub registration (admin)β
- As an authorized user (admin or skill hub manager), open the skill hubs admin (e.g. settings or admin page).
- Add a hub: type
github, locationowner/repo(or a real public repo withskills/*/SKILL.md), save. - Expect: Hub is registered and enabled; after refresh or next catalog refresh, skills from that hub appear in the catalog.
- In chat, type
/skills. - Expect: Skills from the hub are included in the list.
- Remove or disable the hub.
- Refresh catalog or reload; invoke
/skillsagain. - Expect: Skills from that hub are no longer in the list.
Scenario 4: Graceful degradationβ
- Catalog unavailable: Stop MongoDB or make the catalog API return 503. In chat, type
/skills. Expect: Clear βSkills are temporarily unavailableβ (or similar) message; chat remains usable for normal messages. - Hub failure: Register a hub with an invalid or unreachable location. Expect: Rest of catalog still loads; admin or API shows that the hub failed to load (no silent full-catalog failure).
Scenario 5: Unauthorized hub managementβ
- As a non-admin user (no skill hub manager role), call
POST /api/skill-hubs(e.g. via browser or API client) with a valid body. - Expect: 403 with a clear permission message; no hub is created.
Scenario 6: Duplicate skill ID precedenceβ
- Ensure default (or built-in) catalog has a skill with id
foo. - Register a hub that also provides a skill with id
foo. - Expect: Catalog returns one
foo; it is the default (or higher-precedence) one. Documented precedence rule is applied (default > hub or registration order).
Scenario 7: GitHub hub crawl / preview (FR-017)β
- As an authorized user, open skill hub onboarding.
- Enter a public GitHub repo with
skills/*/SKILL.mdand invoke Crawl or Preview (before Save). - Expect: UI lists discovered SKILL.md paths (and optional names); no hub row persisted until user confirms Register.
- Register the hub; refresh catalog / supervisor per Scenario 8.
- Expect: Skills from preview appear in catalog and
/skills.
Scenario 8: Supervisor skills status after refresh (FR-016, SC-007)β
- Note current
graph_generationandskills_loaded_countfrom the supervisor status API (or admin panel). - Add a skill or hub, then call POST catalog refresh (or UI βRefresh skillsβ).
- Expect: Status shows increased or updated
graph_generationand matchingskills_loaded_count(or documented stale indicator if rebuild failed). - Expect: Assistant behavior reflects new skills without pod restart.
Scenario 9: Try skills gateway β Bearer and API key (SC-008, FR-018)β
- Open the skills UI Try skills gateway panel.
- Copy the documented
curlusing a valid Okta/OIDC access token; call catalog withq=search param. - Expect: 200 and only skills in the callerβs entitlement (global + teams + personal).
- Create a catalog API key (admin or self-service, per product); repeat
curlwith the key header. - Expect: Same entitlement rules; 401 with generic message if key revoked or wrong.
- Walk through in-product Claude and Cursor steps; Expect: No external doc required to complete a minimal integration (export path may be βcopy JSONβ until file export ships).
Scenario 10: Visibility β team vs personal (FR-020)β
- As user A, create or select a personal skill (or mock data) visible only to A.
- As user B (same org, different
sub), callGETcatalog. - Expect: B does not see Aβs personal skill; both see global skills; team skills only when B shares team id in token claims.
Scenario 11: Skill-scanner outcomes (SC-009, FR-023)β
- Register a hub whose content triggers a high severity finding in Skill Scanner (test fixture).
- Expect: Admin UI shows finding; behavior matches configured gate (warn vs block).
- Expect: Copy states scanner is best-effort; clean scan does not imply safety.
- Expect: Admin (or scan) UI includes attribution to Cisco AI Defense and link https://github.com/cisco-ai-defense/skill-scanner per FR-023 /
skill-scanner-pipeline.md.
Scenario 12: Large catalog β pagination and prompt cap (FR-019, FR-024)β
- Load >
page_sizeskills (fixture); call catalogpage=1andpage=2. - Expect: Stable ordering;
meta.totalcorrect; no timeout from default list (no fullcontentin list). - Inspect supervisor prompt or logs (non-prod): Expect at most N skill summaries in the Skills System section per
MAX_SKILL_SUMMARIES_IN_PROMPT.
Scenario 13: Catalog list latency (plan p95 smoke)β
- With a typical catalog size for your environment, call
GET /api/skills(or directGET /skillswith a valid token) repeatedly from a workstation or script (e.g. 20β50 sequential requests, or a simple load tool). - Expect: p95 latency under ~500 ms as stated in
plan.mdTechnical Context, or record measured p50/p95 in run notes if the target is not yet met (file issues for optimization). - Use
page_sizeappropriate to the UI default; avoidinclude_content=truefor this check unless testing that path explicitly.
Scenario 14: Gatewayβsupervisor sync status (FR-026, SC-010)β
- Open the Try skills gateway panel as an authorized user.
- Expect: A skills sync (or equivalent) section shows status derived from catalog vs supervisor metadata (
in_sync,supervisor_stale, orunknownpercontracts/supervisor-skills-status.md). - Register a hub or change a skill with
source: agent_skills, then invalidate catalog cache without triggering supervisor rebuild (if you have a test hook that only clears HTTP cache). Expect: UI shows supervisor_stale (or unknown if generations not yet wired), not in_sync. - Call POST /skills/refresh (full semantics: cache + MAS rebuild per FR-012). Re-fetch status. Expect: in_sync (or matching generations).
- Expect: Copy does not claim the assistant has the latest catalog while status is stale.
Quick commands (for implementers)β
- Backend: Ensure skills middleware is loaded by the supervisor and returns the merged list; supervisor uses it for prompt or tools.
- UI: Implement
GET /api/skills(merge default + agent_skills + hubs); implement/skillshandling in chat panel; remove any βrun skillsβ / βRun in Chatβ action from chat; add hub crawl UI callingPOST /api/skill-hubs/crawl; add gateway panel + source badges (FR-021, FR-022). - Supervisor: Wire
POST /skills/refreshto cache invalidation +AIPlatformEngineerMASrebuild; expose status fields percontracts/supervisor-skills-status.md(including sync_status / generations for FR-026); apply visibility + prompt cap when building skills for middleware. - Refactor (FR-025): Align UI/route names with agent-skills /
source: agent_skills; keep reads backward-compatible. - Security: Integrate Skill Scanner per
contracts/skill-scanner-pipeline.md(Cisco AI Defense attribution in UI/docs/NOTICE); store API key hashes only. - Packaged skills: Run
scripts/scan-packaged-skills.shwithSKILLS_DIRset in CI or release pipelines; configureSKILL_SCANNER_GATE/SKILL_SCANNER_POLICYperui/env.example. - Tests: Add integration tests for catalog consistency (UI list vs
/skillsvs middleware); add tests for hub CRUD and 403 when unauthorized; add tests for search pagination and visibility filtering.