Agent skill

Django Targeted Mocking

by hashgraph-online in hashgraph-online/awesome-codex-plugins

Mock Django test boundaries safely with overridesettings, pytest settings, autospecced unittest.mock objects, output/input capture, requests-mock, VCR.py, outbound HTTP blocking, and time-freezing…

MITAuto-check passedBackend & APIs

Install Django Targeted Mocking

skills CLI
$ npx skills add hashgraph-online/awesome-codex-plugins --skill django-targeted-mocking -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hashgraph-online/awesome-codex-plugins django-targeted-mocking --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/LVTD-LLC/skills/skills/django-targeted-mocking .claude/skills/django-targeted-mocking && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
django-targeted-mocking
GitHub stars
1.3k
Token cost
~833 tokens
SKILL.md length
366 words
Files
2 (incl. references)
Skills in repo
714
Repo updated
First seen
Licence
MIT

At a glance

Mock Django test boundaries safely with overridesettings, pytest settings, autospecced unittest.mock objects, output/input capture, requests-mock, VCR.py, outbound HTTP blocking, and time-freezing…

  • Works in 5 steps: Decide whether mocking is necessary. → Patch where the code under test looks up… → Prefer specific tools. → …
  • Tests need to replace settings
  • SKILL.md covers Boundary Workflow, Decision Rules, Common Mistakes and Verification
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Django Targeted Mocking is an agent skill from hashgraph-online/awesome-codex-plugins. Mock Django test boundaries safely with overridesettings, pytest settings, autospecced unittest.mock objects, output/input capture, requests-mock, VCR.py, outbound HTTP blocking, and time-freezing tools. Use when tests need to replace settings, HTTP calls, time, command output, stdin, or external services without broad fragile MagicMock patches.

Its SKILL.md is about 830 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/mocking-patterns.md`). Compatibility notes: Codex, Claude Code, and other Agent Skills-compatible clients.

It sits in Backend & APIs, covering Backend development and Unit testing. It works with Django and pytest. The repository describes itself as: A curated list of awesome OpenAI Codex / ChatGPT plugins, skills, and resources. The 1 Codex Marketplace. See live plugins at: https://hol.org/plugins/best-codex-plugins. The licence is MIT.

When your agent uses it

  • Tests need to replace settings
  • External services without broad fragile MagicMock patches

Example prompts

  • “/django-targeted-mocking”

Requirements

  • Compatibility (from SKILL.md): Codex, Claude Code, and other Agent Skills-compatible clients.

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Decide whether mocking is necessary.
  2. Patch where the code under test looks up the dependency.
  3. Prefer specific tools.
  4. Make mocks interface-aware.
  5. Block unexpected outbound HTTP.

What it can do on your machine

Read from SKILL.md and the folder at commit 9e7b281. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Codex, Claude Code, and other Agent Skills-compatible clients.

    From compatibility in the SKILL.md frontmatter.

Context cost

Django Targeted Mocking loads about 833 tokens when it runs, and up to ~1.3k if it reads all its reference files. Until then it costs about 93 tokens; SKILL.md has 366 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~93
When it runs · the whole SKILL.md, loaded when a task matches
~833
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hashgraph-online/awesome-codex-plugins at commit 9e7b281, republished under its MIT licence (© hashgraph-online). 366 words, ~833 tokens.

Download SKILL.mdSave it as .claude/skills/django-targeted-mocking/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
django-targeted-mocking
description
Mock Django test boundaries safely with override_settings, pytest settings, autospecced unittest.mock objects, output/input capture, requests-mock, VCR.py, outbound HTTP blocking, and time-freezing tools. Use when tests need to replace settings, HTTP calls, time, command output, stdin, or external services without broad fragile MagicMock patches.
compatibility
Codex, Claude Code, and other Agent Skills-compatible clients.
license
MIT
metadata.version
0.1.0
metadata.displayName
Django Targeted Mocking
metadata.category
Django
metadata.tags
django,testing,mocking,http,pytest

Django Targeted Mocking

Mock only at boundaries that are slow, nondeterministic, external, or hard to trigger. Broad mocks can make tests faster while proving less, so prefer framework helpers and interface-checked replacements.

Boundary Workflow

  1. Decide whether mocking is necessary.

    • Prefer real code for local domain logic.
    • Mock external HTTP, time, settings, output/input, and expensive service edges.
  2. Patch where the code under test looks up the dependency.

    • Patch the imported symbol used by the module under test, not the original library path unless that is what the module reads.
  3. Prefer specific tools.

    • Settings: override_settings, modify_settings, or pytest-django's settings fixture.
    • Output: io.StringIO, pytest capsys, or command test helpers.
    • HTTP: requests-mock for hand-authored responses; VCR.py for recorded responses.
    • Time: pass time as a parameter when possible; otherwise use time-machine or a similar time-specific tool.
  4. Make mocks interface-aware.

    • Use autospec=True, spec, spec_set, create_autospec, or a small fake object.
    • Avoid bare Mock/MagicMock when the interface matters.
  5. Block unexpected outbound HTTP.

    • A normal test run should fail if a test reaches the network unintentionally.

Read mocking-patterns.md for concrete patterns.

Show full SKILL.md (188 more words)Show less

Decision Rules

  • Use Django settings helpers instead of direct assignment to django.conf.settings.
  • Prefer a hand-built fake or types.SimpleNamespace when only a few attributes are needed.
  • Use requests-mock for deterministic API responses you control.
  • Use VCR.py when real recorded responses are valuable and safe to store.
  • On CI, configure VCR record mode so missing cassettes fail instead of recording.
  • Mock time consistently across the runtime; do not patch several datetime functions by hand.
  • Do not mock the component whose behavior the test is meant to prove.

Common Mistakes

  • Patching settings directly and leaking state across tests.
  • Using catch-all MagicMock objects that accept typoed attributes and wrong call signatures.
  • Allowing tests to hit real external services.
  • Recording VCR cassettes in CI.
  • Mocking a view's internal helpers so thoroughly that the test no longer covers request behavior.
  • Patching the wrong import path and thinking the mock is active.

Verification

Before finishing:

  • Each mock has a clear boundary reason.
  • Interface-sensitive mocks use specs or fakes.
  • Unexpected outbound HTTP is blocked in the normal suite.
  • Settings are restored automatically by Django or pytest helpers.
  • Tests still cover the behavior, not only mock calls.

© hashgraph-online, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in plugins/LVTD-LLC/skills/skills/django-targeted-mocking of hashgraph-online/awesome-codex-plugins.

  • SKILL.md
  • references/mocking-patterns.md

Open the folder on GitHubat commit 9e7b281

Compare with similar skills

Django Targeted Mocking next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Django Targeted Mocking compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Django Targeted Mocking this skillhashgraph-online/awesome-codex-plugins1.3k—~833Automated safety check: PassMIT
Run And Verifyaropan/clist439—~461Automated safety check: PassApache-2.0
Python Devdoccker/cc-use-exp1.1k—~790Automated safety check: PassCustom licence
Django TDDaffaan-m/ECC276k7 repos~5.3kAutomated safety check: PassMIT
Dj Pytestdvf/opinionated-django109—~4.3kAutomated safety check: NotesMIT
Django TDDaffaan-m/ECC276k3 repos~4.9kAutomated safety check: PassMIT

Similar skills

  • Run And Verify

    aropan/clist

    Choose and run focused checks after changing CLIST Python code: Django tests, standalone pytest tests, offline parser fixtures, Ruff, or a relevant management-command check.

    439 GitHub stars~461 tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Python Dev

    doccker/cc-use-exp

    Python 开发规范。当用户操作 .py、pyproject.toml、requirements.txt、setup.py 文件, 或涉及 FastAPI、Django、Flask、pytest、asyncio 开发时触发。

    1.1k GitHub stars~790 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Django TDD

    affaan-m/ECC

    Django testing strategies with pytest-django, TDD methodology, factoryboy, mocking, coverage, and testing Django REST Framework APIs.

    276k GitHub starsUsed in 7 repos~5.3k tokens
    Testing & QAAuto-check passed
  • Dj Pytest

    dvf/opinionated-django

    Set up and write pytest tests for an op-django project — pytest-django configuration, two-sided Celery testing (patched dispatch sites + plain-function task bodies, never eager mode), freezegun for…

    109 GitHub stars~4.3k tokensUpdated 1 mo ago
    Testing & QAAuto-check: notes
  • Django TDD

    affaan-m/ECC

    Django 测试策略,包括 pytest-django、TDD 方法、factoryboy、模拟、覆盖率以及测试 Django REST Framework API。

    276k GitHub starsUsed in 3 repos~4.9k tokens
    Testing & QAAuto-check passed
  • Write or update Baserow backend tests for core, premium, or enterprise code using pytest, Django, DRF APIClient, and the repo's shared fixture patterns.

    6.1k GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed

More from hashgraph-online/awesome-codex-plugins

All 714 skills in this repo
  • Anime Reaction Gif

    hashgraph-online/awesome-codex-plugins

    Create original anime-style reaction stickers as looping GIFs and MP4 previews, using generated character pose sheets and timed key poses.

    1.3k GitHub stars~922 tokensUpdated today
    Auto-check passed
  • Calibredb

    hashgraph-online/awesome-codex-plugins

    Manage and query Calibre libraries with the calibredb CLI (local paths or Calibre Content server URLs).

    1.3k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Rust API Test Harness

    hashgraph-online/awesome-codex-plugins

    A skill your agent uses when adding, changing, testing, or debugging Rust HTTP APIs and services, especially when Codex needs black-box integration tests, random-port app startup, real database test…

    1.3k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Art

    hashgraph-online/awesome-codex-plugins

    Make a studio's game look like something at build time — a cover from a real frame of the game (free), painted covers, backdrops, textures and character plates from image models through the…

    1.3k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Calle

    hashgraph-online/awesome-codex-plugins

    Use CALL-E from Codex through the calle CLI. An agent skill from hashgraph-online/awesome-codex-plugins.

    1.3k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Game Balance Economy

    hashgraph-online/awesome-codex-plugins

    Balance game difficulty, resources, rewards, probability, progression, economies, and dominant strategies.

    1.3k GitHub stars~618 tokensUpdated today
    Auto-check passed

Works with

Questions about Django Targeted Mocking

What does Django Targeted Mocking do?

Mock Django test boundaries safely with overridesettings, pytest settings, autospecced unittest.mock objects, output/input capture, requests-mock, VCR.py, outbound HTTP blocking, and time-freezing…. Django Targeted Mocking is an agent skill from hashgraph-online/awesome-codex-plugins.py, outbound HTTP blocking, and time-freezing tools.

When should I use Django Targeted Mocking?

Django Targeted Mocking fits situations like: tests need to replace settings; external services without broad fragile MagicMock patches.

How do I install Django Targeted Mocking in Claude Code?

Run `npx skills add hashgraph-online/awesome-codex-plugins --skill django-targeted-mocking -a claude-code`. Or copy the skill folder (plugins/LVTD-LLC/skills/skills/django-targeted-mocking in hashgraph-online/awesome-codex-plugins) into .claude/skills/django-targeted-mocking in your project. Claude Code loads it when a task matches its description.

How do I install Django Targeted Mocking in Codex?

Run `npx skills add hashgraph-online/awesome-codex-plugins --skill django-targeted-mocking -a codex`. Or copy the skill folder (plugins/LVTD-LLC/skills/skills/django-targeted-mocking in hashgraph-online/awesome-codex-plugins) into .agents/skills/django-targeted-mocking in your project. Codex loads it when a task matches its description.

Can I use Django Targeted Mocking in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hashgraph-online/awesome-codex-plugins --skill django-targeted-mocking -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/django-targeted-mocking, .gemini/skills/django-targeted-mocking, .github/skills/django-targeted-mocking and .opencode/skills/django-targeted-mocking in your project.

What does Django Targeted Mocking need to run?

SKILL.md names no scripts, command-line tools or credentials: Django Targeted Mocking is instructions for the agent only. Compatibility (from SKILL.md): Codex, Claude Code, and other Agent Skills-compatible clients..

Does Django Targeted Mocking access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Django Targeted Mocking safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Django Targeted Mocking use?

Django Targeted Mocking is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Django Targeted Mocking use?

About 833 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 487 tokens, read only when the agent opens those files.

What are the alternatives to Django Targeted Mocking?

Skills that share tags, products or a category with Django Targeted Mocking: Run And Verify (aropan/clist, 439 stars), Python Dev (doccker/cc-use-exp, 1.1k stars), Django TDD (affaan-m/ECC, 276k stars) and Dj Pytest (dvf/opinionated-django, 109 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Django Targeted Mocking?

hashgraph-online (a GitHub organization) maintains it in hashgraph-online/awesome-codex-plugins, which has 1,255 GitHub stars. The repository holds 714 skills in this directory. The repository was last updated on October 9, 2026.

Source: hashgraph-online/awesome-codex-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.