testing
Skill by tod-org
Explains how to write and run tests in the tod Rust CLI project. It covers unit tests, integration tests, mocking Todoist API calls and debugging test failures.
Install testing
Built from the published package, never by AI.
git clone --depth 1 https://github.com/tod-org/tod /tmp/tod && mkdir -p ~/.claude/skills && cp -r /tmp/tod/.pi/skills/testing ~/.claude/skills/testingRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/tod-org/tod /tmp/tod && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/tod/.pi/skills/testing ~/.gemini/antigravity-cli/skills/testingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives an AI assistant the testing conventions used in the tod Rust CLI project. It explains where tests belong. Unit tests sit inline at the bottom of each source file in a #[cfg(test)] mod tests block. CLI and integration tests go in tests/*.rs and use assert_cmd and tempfile::tempdir() for isolated config files.
The skill also covers shared fixtures in src/test/fixtures.rs and canned JSON API responses in src/test/responses.rs. It explains how to mock Todoist API calls with mockito::Server::new_async() and point the config at the mock server. It lists the commands to run, including ./scripts/test.sh for full verification and cargo test for filtered runs, plus a cleanup script for stray test config files. It is intended for developers working on tod who write tests or debug failures.
Written from the project's SKILL.md and checked against it.
What it can do
- Unit test placementDescribes inline #[cfg(test)] mod tests blocks at the bottom of each source file.
- Integration testsCovers tests/*.rs using assert_cmd and tempfile::tempdir() for isolated config files.
- Shared fixturesPoints to shared test fixtures in src/test/fixtures.rs.
- Canned API responsesPoints to canned JSON Todoist API responses in src/test/responses.rs (ResponseFromFile).
- Todoist API mockingMocks API calls with mockito::Server::new_async() and with_mock_url(server.url()).
- Full verificationRuns ./scripts/test.sh for format, check, clippy, tests and forgotten-strings.
- Test cleanupUses ./scripts/testcfg_clean.sh to remove stray tests/*.testcfg files.
What you need
- Rust and cargo
- A checkout of the tod project
Try asking
- Write a unit test for a function in the tod project
- Mock a Todoist API call with mockito in a tod test
- Clean up stray tests/*.testcfg files after a test run
Good to know
- Test runs can leave tests/*.testcfg files behind, so cleanup may be needed.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .pi/skills/testing/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md975 B
Alternatives to testing
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
testing: common questions
How are unit tests organized in tod?
Unit tests are written inline at the bottom of each source file in a #[cfg(test)] mod tests block. CLI and integration tests live in tests/*.rs.
How are Todoist API calls mocked in tests?
The skill uses mockito::Server::new_async() and points the config at the mock with .with_mock_url(server.url()).
What does ./scripts/test.sh check?
According to the source, it runs full verification: format, check, clippy, tests and forgotten-strings.
How do I install testing?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is testing free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is testing safe to use?
It scores 69 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to testing?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
