Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add LeoLin990405/r-analytics-skill --skill mockerygit clone --depth 1 https://github.com/LeoLin990405/r-analytics-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/leolin990405/r-analytics-skill/mockery)<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/mockery"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/mockery/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/mockery"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/mockery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00021 | $0.00501 |
| Opus 5 | $0.00010 | $0.00251 |
| Sonnet 5 | $0.00004 | $0.00100 |
| Haiku 4.5 | $0.00002 | $0.00050 |
Grade A, and why
mockery scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
mockery Package
Mocking for unit tests.
Basic Mocking
library(mockery)
library(testthat)
test_that("function uses dependency", {
# Create mock
m <- mock(42)
# Stub the function
stub(my_function, "dependency_function", m)
# Run test
result <- my_function()
# Verify mock was called
expect_called(m, 1)
expect_equal(result, 42)
})
Mock Return Values
# Single return value
m <- mock(42)
# Multiple return values (cycle through)
m <- mock(1, 2, 3, cycle = TRUE)
# Different values each call
m <- mock(1, 2, 3)
m() # 1
m() # 2
m() # 3
Verify Calls
m <- mock(TRUE)
stub(my_function, "api_call", m)
my_function("arg1", "arg2")
# Check call count
expect_called(m, 1)
# Check arguments
expect_args(m, 1, "arg1", "arg2")
# Get all calls
mock_calls(m)
mock_args(m)
Stub in Namespace
test_that("stubs package function", {
m <- mock(data.frame(x = 1))
# Stub in specific namespace
stub(my_function, "dplyr::filter", m)
result <- my_function()
expect_called(m, 1)
})
Mock Side Effects
# Mock that throws error
m <- mock(stop("API error"))
# Mock with side effect
counter <- 0
m <- mock(side_effect = function(...) {
counter <<- counter + 1
return(counter)
})
Example: API Testing
test_that("handles API response", {
mock_response <- list(status = 200, data = list(id = 1))
m <- mock(mock_response)
stub(fetch_data, "httr::GET", m)
result <- fetch_data("https://api.example.com")
expect_called(m, 1)
expect_equal(result$id, 1)
})
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 110 lines · 21 tokens per session scan A ad1fd8dad5e6
mockery is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 21 tokens to every session and 501 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
bio-applied-testing-cicd
Write pytest tests/fixtures for bio functions and GitHub Actions CI with pytest-cov, ruff, black, mypy. Use when adding tests to a bio tool, writing conftest.py fixtures, or building tests.yml/lint.yml CI workflows.
cloudflare-workers-testing
Comprehensive testing guide for Cloudflare Workers using Vitest and @cloudflare/vitest-pool-workers. Use for test setup, binding mocks (D1/KV/R2/DO), integration tests, or encountering test failures, mock errors, coverage issues.
bun-test-lifecycle
Use for test lifecycle hooks: beforeAll, afterAll, beforeEach, afterEach, fixtures, preload.
bun-test-mocking
Use for mock functions in Bun tests, spyOn, mock.module, implementations, and test doubles.
bun-test-basics
Use for bun:test syntax, assertions, describe/it, test.skip/only/each, and basic patterns.
bun-test-coverage
Use for test coverage with Bun, --coverage flag, lcov reports, thresholds, and CI integration.