Skip to content

Commit 43c5248

Browse files
committed
feat(rss): add LLM-friendly examples to all rss commands
1 parent 419afc5 commit 43c5248

3 files changed

Lines changed: 122 additions & 83 deletions

File tree

claude/skills/agentio-rss/SKILL.md

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,65 @@
11
---
22
name: agentio-rss
3-
description: Use when reading RSS/Atom feeds - list articles, get article content, or get feed info from any blog URL. Auto-discovers feed URLs from blog home pages.
3+
description: Use when reading RSS feeds via the agentio CLI.
44
---
55

6-
# RSS Feed Operations with agentio
6+
# Rss via agentio
77

8-
Use `agentio rss` commands to read RSS/Atom feeds. Just provide a blog URL - the feed will be auto-discovered.
8+
Auto-generated from `agentio skill rss`. Do not edit by hand.
99

10-
## List Articles
10+
## agentio rss articles <url>
1111

12-
```bash
13-
agentio rss articles <url> [--limit N] [--since YYYY-MM-DD]
14-
```
12+
List articles from a blog
1513

1614
Options:
15+
1716
- `--limit <n>`: Number of articles (default: 20)
18-
- `--since <date>`: Only articles after this date
17+
- `--since <date>`: Only articles after this date (YYYY-MM-DD)
1918

20-
Examples:
21-
```bash
22-
agentio rss articles https://simonwillison.net --limit 5
23-
agentio rss articles https://steipete.me --since 2025-01-01
2419
```
20+
Examples:
21+
22+
# 20 most recent articles (feed auto-discovered from blog URL)
23+
agentio rss articles https://simonwillison.net
24+
25+
# cap to 5 articles
26+
agentio rss articles https://simonwillison.net --limit 5
2527
26-
## Get Article Content
28+
# only articles since a date
29+
agentio rss articles https://steipete.me --since 2026-01-01
2730
28-
```bash
29-
agentio rss get <url> <article-id>
31+
# direct feed URL also works
32+
agentio rss articles https://example.com/feed.xml --limit 10
3033
```
3134

32-
The article-id can be the article URL or GUID from the articles list.
35+
## agentio rss get <url> <article-id>
36+
37+
Get a specific article
3338

34-
Example:
35-
```bash
36-
agentio rss get https://blog.fsck.com https://blog.fsck.com/2025/12/27/streamlinear/
3739
```
40+
Examples:
3841
39-
## Get Feed Info
42+
# fetch full content by article URL (most common — copy from 'rss articles' output)
43+
agentio rss get https://blog.fsck.com https://blog.fsck.com/2025/12/27/streamlinear/
4044
41-
```bash
42-
agentio rss info <url>
45+
# by GUID (also shown in the articles list)
46+
agentio rss get https://simonwillison.net "tag:simonwillison.net,2024:/blog/2024/jan/12/article"
4347
```
4448

45-
Shows feed title, description, discovered feed URL, and article count.
49+
## agentio rss info <url>
50+
51+
Get feed information
4652

47-
Example:
48-
```bash
49-
agentio rss info https://kau.sh
5053
```
54+
Examples:
55+
56+
# title, description, discovered feed URL, article count
57+
agentio rss info https://kau.sh
5158
52-
## Feed Auto-Discovery
59+
# also accepts a direct feed URL
60+
agentio rss info https://example.com/atom.xml
5361
54-
The URL can be:
55-
- A blog home page (e.g., `https://simonwillison.net`)
56-
- A direct feed URL (e.g., `https://example.com/feed.xml`)
62+
Auto-discovery looks for HTML <link rel="alternate"> tags first, then falls
63+
back to common paths: /feed, /feed.xml, /rss.xml, /atom.xml, /index.xml.
64+
```
5765

58-
Auto-discovery checks:
59-
1. HTML `<link rel="alternate">` tags
60-
2. Common paths: `/feed`, `/feed.xml`, `/rss.xml`, `/atom.xml`, `/index.xml`

src/commands/help-examples.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ const EXEMPT_PENDING = new Set<string>([
5555
'gtasks delete',
5656
'gtasks clear',
5757
'gtasks move',
58-
'rss articles',
59-
'rss get',
60-
'rss info',
6158
'slack send',
6259
'sql query',
6360
'whatsapp inbox pull',

src/commands/rss.ts

Lines changed: 84 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Command } from 'commander';
22
import { RssClient } from '../services/rss/client';
33
import { handleError } from '../utils/errors';
4+
import { addExamples } from '../utils/command-tree';
45
import {
56
printRssArticleList,
67
printRssArticle,
@@ -13,56 +14,92 @@ export function registerRssCommands(program: Command): void {
1314
.description('RSS feed operations');
1415

1516
// Get articles from a feed
16-
rss
17-
.command('articles')
18-
.description('List articles from a blog')
19-
.argument('<url>', 'Blog URL (feed will be auto-discovered)')
20-
.option('--limit <n>', 'Number of articles', '20')
21-
.option('--since <date>', 'Only articles after this date (YYYY-MM-DD)')
22-
.action(async (url, options) => {
23-
try {
24-
const client = new RssClient();
25-
const listOptions = {
26-
limit: parseInt(options.limit, 10),
27-
since: options.since ? new Date(options.since) : undefined,
28-
};
17+
addExamples(
18+
rss
19+
.command('articles')
20+
.description('List articles from a blog')
21+
.argument('<url>', 'Blog URL (feed will be auto-discovered)')
22+
.option('--limit <n>', 'Number of articles', '20')
23+
.option('--since <date>', 'Only articles after this date (YYYY-MM-DD)')
24+
.action(async (url, options) => {
25+
try {
26+
const client = new RssClient();
27+
const listOptions = {
28+
limit: parseInt(options.limit, 10),
29+
since: options.since ? new Date(options.since) : undefined,
30+
};
2931

30-
const info = await client.getInfo(url);
31-
const articles = await client.list(url, listOptions);
32-
printRssArticleList(articles, info.title);
33-
} catch (error) {
34-
handleError(error);
35-
}
36-
});
32+
const info = await client.getInfo(url);
33+
const articles = await client.list(url, listOptions);
34+
printRssArticleList(articles, info.title);
35+
} catch (error) {
36+
handleError(error);
37+
}
38+
}),
39+
`Examples:
40+
41+
# 20 most recent articles (feed auto-discovered from blog URL)
42+
agentio rss articles https://simonwillison.net
43+
44+
# cap to 5 articles
45+
agentio rss articles https://simonwillison.net --limit 5
46+
47+
# only articles since a date
48+
agentio rss articles https://steipete.me --since 2026-01-01
49+
50+
# direct feed URL also works
51+
agentio rss articles https://example.com/feed.xml --limit 10`,
52+
);
3753

3854
// Get a specific article
39-
rss
40-
.command('get')
41-
.description('Get a specific article')
42-
.argument('<url>', 'Blog URL (feed will be auto-discovered)')
43-
.argument('<article-id>', 'Article ID or URL')
44-
.action(async (url, articleId) => {
45-
try {
46-
const client = new RssClient();
47-
const article = await client.get(url, articleId);
48-
printRssArticle(article);
49-
} catch (error) {
50-
handleError(error);
51-
}
52-
});
55+
addExamples(
56+
rss
57+
.command('get')
58+
.description('Get a specific article')
59+
.argument('<url>', 'Blog URL (feed will be auto-discovered)')
60+
.argument('<article-id>', 'Article ID or URL')
61+
.action(async (url, articleId) => {
62+
try {
63+
const client = new RssClient();
64+
const article = await client.get(url, articleId);
65+
printRssArticle(article);
66+
} catch (error) {
67+
handleError(error);
68+
}
69+
}),
70+
`Examples:
71+
72+
# fetch full content by article URL (most common — copy from 'rss articles' output)
73+
agentio rss get https://blog.fsck.com https://blog.fsck.com/2025/12/27/streamlinear/
74+
75+
# by GUID (also shown in the articles list)
76+
agentio rss get https://simonwillison.net "tag:simonwillison.net,2024:/blog/2024/jan/12/article"`,
77+
);
5378

5479
// Get feed info
55-
rss
56-
.command('info')
57-
.description('Get feed information')
58-
.argument('<url>', 'Blog URL (feed will be auto-discovered)')
59-
.action(async (url) => {
60-
try {
61-
const client = new RssClient();
62-
const info = await client.getInfo(url);
63-
printRssFeedInfo(info);
64-
} catch (error) {
65-
handleError(error);
66-
}
67-
});
80+
addExamples(
81+
rss
82+
.command('info')
83+
.description('Get feed information')
84+
.argument('<url>', 'Blog URL (feed will be auto-discovered)')
85+
.action(async (url) => {
86+
try {
87+
const client = new RssClient();
88+
const info = await client.getInfo(url);
89+
printRssFeedInfo(info);
90+
} catch (error) {
91+
handleError(error);
92+
}
93+
}),
94+
`Examples:
95+
96+
# title, description, discovered feed URL, article count
97+
agentio rss info https://kau.sh
98+
99+
# also accepts a direct feed URL
100+
agentio rss info https://example.com/atom.xml
101+
102+
Auto-discovery looks for HTML <link rel="alternate"> tags first, then falls
103+
back to common paths: /feed, /feed.xml, /rss.xml, /atom.xml, /index.xml.`,
104+
);
68105
}

0 commit comments

Comments
 (0)