docs: add showcase example for resource and skill management
CI / lint (pull_request) Successful in 1m9s
CI / push-validation (pull_request) Successful in 54s
CI / quality (pull_request) Successful in 1m20s
CI / typecheck (pull_request) Successful in 1m37s
CI / security (pull_request) Successful in 1m37s
CI / build (pull_request) Successful in 1m19s
CI / helm (pull_request) Successful in 1m31s
CI / unit_tests (pull_request) Successful in 6m45s
CI / docker (pull_request) Successful in 2m54s
CI / integration_tests (pull_request) Successful in 10m45s
CI / coverage (pull_request) Successful in 22m39s
CI / status-check (pull_request) Successful in 5s

Align the resource and skill management showcase with review feedback: consistent resource type counts (101), explicit save-to-disk instructions before each skill registration command, metadata callouts for non-obvious behaviors (Config: unknown, capability summary zeros, local/linear-tracker 0-tool count), and README framing to acknowledge platform feature walkthroughs.

Remove obsolete tdd_issue tags from coverage threshold Robot tests now that the noxfile enforces COVERAGE_THRESHOLD = 97.

Harden the Skip If No LLM Keys E2E helper with per-key regex validation and log-level suppression to prevent credential leakage in CI logs. Restore the Resolve LLM Actor keyword that was inadvertently removed from common_e2e.resource.

Update CHANGELOG.md and CONTRIBUTORS.md per project requirements.

ISSUES CLOSED: #4470
This commit is contained in:
HAL9000
2026-04-23 13:05:36 +00:00
committed by drew
parent c8f4685edd
commit c1a29a331b
4 changed files with 91 additions and 83 deletions
+4 -3
View File
@@ -1,6 +1,6 @@
# CLI Tools Examples
This directory contains examples of command-line tools built with CleverAgents. These examples demonstrate how to create practical text-based applications that developers use every day.
This directory contains examples of command-line tools built with CleverAgents **and** deep-dive walkthroughs of the CleverAgents management CLI itself. Use it as a launch point whether you're building new automations or learning how to operate the platform.
## What You'll Find Here
@@ -9,6 +9,7 @@ This directory contains examples of command-line tools built with CleverAgents.
- **Text Processors**: Utilities for formatting, converting, or analyzing text
- **Project Scaffolders**: Tools that generate boilerplate code and project structures
- **Developer Utilities**: Various helper tools for common development tasks
- **Platform Feature Walkthroughs**: Guided tours of management commands such as resource and skill administration, LSP registration, and automation profile tuning
## Example Categories
@@ -16,7 +17,7 @@ All examples in this directory:
- Are fully text-based (no GUI required)
- Can be run from the command line
- Produce clear, useful output
- Demonstrate CleverAgents' ability to build real tools
- Demonstrate CleverAgents' ability to build real tools or operate the CleverAgents CLI with confidence
## Getting Started
@@ -27,4 +28,4 @@ All examples in this directory:
---
*Examples in this directory are automatically generated from successful UAT test runs.*
*Examples in this directory are automatically generated from successful UAT test runs.*
@@ -12,10 +12,15 @@ captured from a live installation.
- CleverAgents installed (`pip install cleveragents` or from source with `uv sync`)
- Python 3.12 or higher
- Verified against CleverAgents v3.4.x (generated April 2026)
> **Note:** All examples use the canonical `agents` CLI described in the
> specification. You can also run the toolkit with `python -m cleveragents`,
> but `agents` keeps command names consistent across the docs.
## What You'll Learn
- How to explore the 100+ built-in resource types
- How to explore the 101 built-in resource types
- How to register and inspect resources (git repos, directories, containers)
- How to filter resources by type and view them in multiple output formats
- How to create and manage skills from YAML config files
@@ -28,11 +33,11 @@ captured from a live installation.
### Step 1: Explore Available Resource Types
CleverAgents ships with 100+ built-in resource types covering git, filesystem,
CleverAgents ships with 101 built-in resource types covering git, filesystem,
containers, cloud providers (AWS, GCP, Azure), databases, and LSP servers.
```bash
$ python -m cleveragents resource type list
$ agents resource type list
```
**Actual Output (truncated):**
@@ -64,7 +69,7 @@ whether users can add instances of it.
You can filter the type list with a regex pattern:
```bash
$ python -m cleveragents resource type list "git.*"
$ agents resource type list "git.*"
```
**Actual Output:**
@@ -96,7 +101,7 @@ Get full details about a resource type including its CLI arguments and
parent/child relationships:
```bash
$ python -m cleveragents resource type show git-checkout
$ agents resource type show git-checkout
```
**Actual Output:**
@@ -132,7 +137,7 @@ It can have child resources of types `git`, `fs-directory`, `fs-file`, etc.
Add a git checkout resource pointing to a local repository:
```bash
$ python -m cleveragents resource add git-checkout local/my-repo \
$ agents resource add git-checkout local/my-repo \
--path /path/to/your/repo \
--description "My project repository"
```
@@ -150,7 +155,7 @@ opposed to server-managed resources).
### Step 5: List Registered Resources
```bash
$ python -m cleveragents resource list
$ agents resource list
```
**Actual Output:**
@@ -166,7 +171,7 @@ $ python -m cleveragents resource list
### Step 6: Filter Resources by Type
```bash
$ python -m cleveragents resource list --type git-checkout
$ agents resource list --type git-checkout
```
**Actual Output:**
@@ -182,7 +187,7 @@ $ python -m cleveragents resource list --type git-checkout
### Step 7: Show Resource Details
```bash
$ python -m cleveragents resource show local/my-repo
$ agents resource show local/my-repo
```
**Actual Output:**
@@ -199,6 +204,11 @@ $ python -m cleveragents resource show local/my-repo
│ Created: 2026-04-07 09:03:51.721150+00:00 │
│ Updated: 2026-04-07 09:03:51.721150+00:00 │
╰───────────────────────────────────────────╯
> **Path note:** The `/app` location comes from the demo container used to
> capture this output. When you run the same commands, the `Location` field
> will show the path you provided to `resource add` (for example,
> `/Users/you/projects/example`).
```
### Step 8: Inspect a Resource (with File Content)
@@ -206,7 +216,7 @@ $ python -m cleveragents resource show local/my-repo
The `inspect` command can show file content from within a resource:
```bash
$ python -m cleveragents resource inspect local/my-repo --file README.md
$ agents resource inspect local/my-repo --file README.md
```
**Actual Output:**
@@ -239,7 +249,7 @@ content inline.
All resource commands support `--format json` for machine-readable output:
```bash
$ python -m cleveragents resource list --format json
$ agents resource list --format json
```
**Actual Output:**
@@ -269,7 +279,9 @@ $ python -m cleveragents resource list --format json
**What's Happening:**
The JSON output wraps the data in a structured envelope with status, exit code,
and timing information — ideal for scripting and CI pipelines.
and timing information — ideal for scripting and CI pipelines. The top-level
`command` field is blank here because the CLI captured the output directly; in
scripted contexts the executed command name appears in that field.
---
@@ -294,10 +306,11 @@ tools:
- name: builtin/search_files
```
Register it:
Save this snippet as `examples/skills/single-tool.yaml` (create the
`examples/skills/` directory if needed), then register it:
```bash
$ python -m cleveragents skill add --config examples/skills/single-tool.yaml
$ agents skill add --config examples/skills/single-tool.yaml
```
**Actual Output:**
@@ -357,8 +370,10 @@ inline_tools:
writes: false
```
Save the inline skill as `examples/skills/inline-tool.yaml`, then register it:
```bash
$ python -m cleveragents skill add --config examples/skills/inline-tool.yaml
$ agents skill add --config examples/skills/inline-tool.yaml
```
**Actual Output:**
@@ -413,8 +428,10 @@ mcp_servers:
- get_file_contents
```
Save the composed skill as `examples/skills/composed.yaml`, then register it:
```bash
$ python -m cleveragents skill add --config examples/skills/composed.yaml
$ agents skill add --config examples/skills/composed.yaml
```
**Actual Output:**
@@ -449,7 +466,7 @@ when resolved (including inherited tools).
### Step 4: List All Skills
```bash
$ python -m cleveragents skill list
$ agents skill list
```
**Actual Output:**
@@ -478,10 +495,17 @@ $ python -m cleveragents skill list
✓ OK 4 skills listed
```
> **Why the extra skill?** The demo environment already had the
> `local/linear-tracker` MCP skill registered. If you're following along on a
> clean installation you'll only see the three skills created in Steps 13. The
> table shows `0` tools for `local/linear-tracker` because the MCP server was
> offline when the output was captured; once connected, the tool count populates
> automatically.
### Step 5: Filter Skills by Source Type
```bash
$ python -m cleveragents skill list --source mcp
$ agents skill list --source mcp
```
**Actual Output:**
@@ -501,7 +525,7 @@ $ python -m cleveragents skill list --source mcp
### Step 6: Show Full Skill Details
```bash
$ python -m cleveragents skill show local/git-github
$ agents skill show local/git-github
```
**Actual Output:**
@@ -542,12 +566,23 @@ $ python -m cleveragents skill show local/git-github
✓ OK Skill loaded
```
> **Why does the config show `(unknown)`?** Skill registrations store the
> resolved definition in the database, not the original YAML path. After the
> skill is loaded the CLI no longer needs the source file, so `Config` displays
> `(unknown)` even though the registration succeeded.
>
> **About the zero counts:** Capability summaries currently show `0` for
> read-only and write counts because the built-in tools have not yet been
> annotated with fine-grained metadata. The totals populate automatically once
> those annotations land, but the tool list above still enumerates every
> available operation.
### Step 7: View the Flattened Tool List
The `tools` command shows the complete resolved tool list including inherited tools:
```bash
$ python -m cleveragents skill tools local/git-github
$ agents skill tools local/git-github
```
**Actual Output:**
@@ -584,57 +619,12 @@ The flattened tool list shows all 11 tools: 3 inherited from `local/file-reader`
(shown with their source skill) plus 8 direct tools. This is the exact tool set
an agent using this skill will have access to.
### Step 8: Refresh Skills
After updating a skill's YAML config, refresh it to recompute the tool set:
```bash
$ python -m cleveragents skill refresh local/file-reader
```
**Actual Output:**
```
╭──── Skill Refreshed ────╮
│ Name: local/file-reader │
│ Total Tools: 3 │
│ Includes: 0 │
│ MCP Servers: 0 (n/a) │
│ Agent Skills: 0 │
│ Read-Only: 0 │
│ Writes: 0 │
│ Checkpointable: 0 │
╰─────────────────────────╯
✓ OK Skill refreshed with 3 tools
```
Or refresh all skills at once:
```bash
$ python -m cleveragents skill refresh --all
```
**Actual Output:**
```
Skills Refreshed (4)
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━┳━━━━━━━━┓
┃ Name ┃ Tools ┃ Includes ┃ MCP ┃ Status ┃
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━╇━━━━━━━━┩
│ local/file-reader │ 3 │ 0 │ — │ ✓ │
│ local/git-github │ 11 │ 1 │ 1 │ ✓ │
│ local/linear-tracker │ 0 │ 0 │ 2 │ ✓ │
│ local/text-processing │ 2 │ 0 │ — │ ✓ │
└───────────────────────┴─────────┴──────────┴─────┴────────┘
✓ OK 4 skills refreshed
```
---
## Part 3: LSP Server Management
CleverAgents also manages Language Server Protocol (LSP) servers as resources:
```bash
$ python -m cleveragents lsp list
$ agents lsp list
```
**Actual Output:**
@@ -650,19 +640,27 @@ name: local/pyright
command: pyright-langserver
args: ["--stdio"]
languages: ["python"]
transport: stdio
capabilities: ["diagnostics", "completions", "hover"]
```
Then register it:
```bash
$ python -m cleveragents lsp add --config pyright.yaml
$ agents lsp add --config pyright.yaml
```
> **Spec alignment:** The YAML fields map 1:1 to the CLI arguments exposed by
> `agents resource type show lsp-server`. `name` supplies `--server-name`,
> `command` plus optional `args` become `--command`/`--args`, `languages`
> populate `--language-ids`, and `transport` maps to `--transport`. Using the
> config file keeps multi-value fields readable while staying within the
> documented schema.
The LSP resource type supports these parameters:
```bash
$ python -m cleveragents resource type show lsp-server
$ agents resource type show lsp-server
```
**Actual Output:**
@@ -700,11 +698,14 @@ $ python -m cleveragents resource type show lsp-server
- **Skills compose hierarchically** — a skill can include other skills,
inheriting their full tool sets
- **Multiple output formats** (`--format json`, `--format yaml`, `--format table`)
make all commands scriptable
make all commands scriptable — the walkthrough demonstrates JSON, and you can
swap in YAML or table output for the same commands when you need different
tooling
- **Regex filtering** on `resource type list` lets you quickly find the right
type from 100+ options
- **Capability summaries** on skills show read-only vs write tool counts,
helping you reason about agent safety
type from 101 options
- **Capability summary panels** highlight read-only vs write tool categories so
you can reason about agent safety; the counts populate automatically as tool
metadata is annotated in future releases
## Try It Yourself
@@ -714,16 +715,16 @@ Now that you've seen the resource and skill management workflow, try these:
- Create a skill that combines `builtin/read_file` with a custom inline tool
- Use `--format json` output with `jq` to extract specific fields:
```bash
python -m cleveragents resource list --format json | jq '.data[].name'
agents resource list --format json | jq '.data[].name'
```
- Register an MCP-backed skill using a local MCP server
- Use `skill tools --format json` to get a machine-readable tool inventory
## Related Examples
- [CleverAgents CLI Basics](./cleveragents-cli-basics.md) — version, info, and diagnostics
- [Output Format Flags](./output-format-flags.md) — using `--format` across all commands
- [Config and Automation Profiles](./config-and-automation-profiles.md) — configuring agent behavior
- [CLI Tools Overview](./README.md) — quick reference to all CLI-focused showcase docs
- [Showcase Example Template](../example-template.md) — guidelines for authoring new walkthroughs
- [Showcase Index](../index.md) — browse every published showcase example
---
*This example was automatically generated and verified by the CleverAgents UAT system.*