diff --git a/rust/SYMPOSIUM.toml b/rust/SYMPOSIUM.toml new file mode 100644 index 0000000..b8b168a --- /dev/null +++ b/rust/SYMPOSIUM.toml @@ -0,0 +1,5 @@ +name = "symposium" +crates = ["*"] + +[[skills]] +source.path = "." diff --git a/rust/find-crate-source/SKILL.md b/rust/find-crate-source/SKILL.md new file mode 100644 index 0000000..410d865 --- /dev/null +++ b/rust/find-crate-source/SKILL.md @@ -0,0 +1,10 @@ +--- +name: find-crate-source +description: Find sources for a Rust crate from crates.io. Activate this skill to inspect a crate's API. +--- + +To find the source for a crate, use the `cargo agents` CLI tool available in the PATH: + +* `cargo agents crate-info $CRATE_NAME` will give you the source path for the crate, preferring to use the version found in your current package. If the crate is not yet used, it will give you the latest version. +* `cargo agents crate-info $CRATE_NAME --version $VERSION` will give you the source path for a specific version + * `$VERSION` is a semver constraint, so `1.0` will give you something compatible with `1.0`; `=1.0.0` is guaranteed to give you an exact version. diff --git a/rust/rust-best-practice/SKILL.md b/rust/rust-best-practice/SKILL.md new file mode 100644 index 0000000..7c709a9 --- /dev/null +++ b/rust/rust-best-practice/SKILL.md @@ -0,0 +1,11 @@ +--- +name: rust-best-practice +description: [Critical] Best practice for Rust coding. Always activate this skill before authoring Rust code or answering questions about Rust. +--- + +# Important dos and don'ts for working with Rust source code + +* Use `cargo add` to add new dependencies or features rather than editing `Cargo.toml` directly +* Before finishing your turn, when editing Rust code: + * Run `cargo fmt` after modifying Rust source files to ensure consistent formatting + * Run tests (most commonly `cargo test --all --workspace`, though some projects may have other commands) diff --git a/symposium.toml b/symposium.toml deleted file mode 100644 index 35540c8..0000000 --- a/symposium.toml +++ /dev/null @@ -1,2 +0,0 @@ -name = "symposium" -session-start-context = "**Critical:** Before authoring Rust code, run `symposium start` for instructions."