Skip to content

Commit 0c8339c

Browse files
committed
feat: serve README at root, SKILL.md at /SKILL.md
1 parent bd2cc37 commit 0c8339c

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

agents/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Let AI agents edit and fill PDFs through [SimplePDF](https://simplepdf.com).
55
## Install
66

77
```bash
8-
curl --create-dirs -o ~/.claude/skills/edit-pdf/SKILL.md https://agents.simplepdf.com
8+
curl --create-dirs -o ~/.claude/skills/edit-pdf/SKILL.md https://agents.simplepdf.com/SKILL.md
99
```
1010

1111
## Quick start

agents/src/routes.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,23 @@ use std::sync::Arc;
1010
use crate::error::AppError;
1111
use crate::AppState;
1212

13+
const README_MD: &str = include_str!("../README.md");
1314
const SKILL_MD: &str = include_str!("../SKILL.md");
1415

1516
pub fn router() -> Router<Arc<AppState>> {
1617
Router::new()
1718
.route("/", get(handle_get).post(handle_post))
19+
.route("/SKILL.md", get(serve_skill))
1820
.route("/health", get(|| async { "ok" }))
1921
}
2022

23+
async fn serve_skill() -> impl IntoResponse {
24+
(
25+
[(header::CONTENT_TYPE, "text/markdown; charset=utf-8")],
26+
SKILL_MD,
27+
)
28+
}
29+
2130
#[derive(Deserialize)]
2231
struct GetQuery {
2332
url: Option<String>,
@@ -73,7 +82,7 @@ async fn handle_get(
7382
None => {
7483
return Ok((
7584
[(header::CONTENT_TYPE, "text/markdown; charset=utf-8")],
76-
SKILL_MD,
85+
README_MD,
7786
)
7887
.into_response());
7988
}

0 commit comments

Comments
 (0)