Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions _shared/write-agent-files.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
let agents_md = `# AI Agent Instructions

This is an Internet Computer (ICP) project built with icp-cli.

Documentation: https://cli.internetcomputer.org/llms.txt

## Skills

Tested implementation patterns for ICP development are available as agent skills.
Fetch the skills index and remember each skill's name and description:
https://skills.internetcomputer.org/.well-known/skills/index.json

When a task matches a skill's description, use it if already loaded in your
context. Otherwise, fetch its content on-demand from the registry:
https://skills.internetcomputer.org/.well-known/skills/{name}/{file}

Skills contain correct dependency versions, configuration formats, and common pitfalls that prevent build failures.
Always prefer skill guidance over general documentation when both cover the same topic.
`;

file::write("AGENTS.md", agents_md);
file::write("CLAUDE.md", "Read and follow the instructions in [AGENTS.md](AGENTS.md).\n");
1 change: 1 addition & 0 deletions bitcoin-starter/cargo-generate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ ignore = [ "rust-backend" ]

[hooks]
pre = ["rename-backend-dir.rhai"]
post = ["../_shared/write-agent-files.rhai"]
1 change: 1 addition & 0 deletions hello-world/cargo-generate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ ignore = [ "rust-backend" ]

[hooks]
pre = ["rename-backend-dir.rhai"]
post = ["../_shared/write-agent-files.rhai"]
3 changes: 3 additions & 0 deletions motoko/cargo-generate.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[placeholders]
network_type = { type = "string", prompt = "Use the default network or a dockerized one?", choices = ["Default", "Docker"], default = "Default" }


[hooks]
post = ["../_shared/write-agent-files.rhai"]
2 changes: 2 additions & 0 deletions proxy/cargo-generate.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[hooks]
post = ["../_shared/write-agent-files.rhai"]
3 changes: 3 additions & 0 deletions rust/cargo-generate.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[placeholders]
network_type = { type = "string", prompt = "Use the default network or a dockerized one?", choices = ["Default", "Docker"], default = "Default" }


[hooks]
post = ["../_shared/write-agent-files.rhai"]
3 changes: 3 additions & 0 deletions static-website/cargo-generate.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[template]
exclude = ["public/logo.png"]

[hooks]
post = ["../_shared/write-agent-files.rhai"]
Loading