add-tests
Skill4 starsChanged 4 months agoMITView on GitHub
Generate tests for pico components. Use when creating unit tests, integration tests, or test fixtures for services, repositories, controllers, or agents.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- buildomator/buildomatortheir own version, first seen Nov 4, 2026
- ypxing/coding-crewtheir own version, first seen Oct 13, 2026
- royalpinto007/ship-skillstheir own version, first seen Oct 13, 2026
- owid/owid-graphertheir own version, first seen Oct 8, 2026
- davidmeirlevy/obvious-skillstheir own version, first seen Jul 5, 2026
- tykisgod/quick-questiontheir own version, first seen Mar 28, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- owid/owid-grapher★ 1.6ksame name
- buildomator/buildomator★ 102same name
- tykisgod/quick-question★ 12same name
- davidmeirlevy/obvious-skills★ 6same name
- royalpinto007/ship-skills★ 1same name
- ypxing/coding-crew★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- add-actuatorSkill
- add-appSkill
- add-authSkill
- add-celery-taskSkill
- add-componentSkill
- add-controllerSkill
- add-repositorySkill
- add-server-authSkill
- add-validationSkill
- init-projectSkill
- pico-conventionsSkill
- releaseSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Read the component source code first, then generate tests following these patterns.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add Tests
Generate tests for: $ARGUMENTS
Read the component source code first, then generate tests following these patterns.
Service Test (unit)
import pytest
from unittest.mock import AsyncMock
class TestMyService:
@pytest.fixture
def mock_repo(self):
repo = AsyncMock()
repo.find_by_id.return_value = User(id=1, name="Alice")
return repo
@pytest.fixture
def service(self, mock_repo):
return MyService(repo=mock_repo)
@pytest.mark.asyncio
async def test_get_user_returns_user(self, service):
result = await service.get_user(1)
assert result.name == "Alice"
@pytest.mark.asyncio
async def test_get_user_raises_when_not_found(self, service, mock_repo):
mock_repo.find_by_id.return_value = None
with pytest.raises(ValueError, match="not found"):
await service.get_user(999)Repository Test (integration, in-memory DB)
import pytest
from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker
from pico_sqlalchemy import SessionManager, AppBase
@pytest.fixture
async def session_manager():
engine = create_async_engine("sqlite+aiosqlite:///:memory:")
async with engine.begin() as conn:
await conn.run_sync(AppBase.metadata.create_all)
sm = SessionManager(async_sessionmaker(engine))
yield sm
await engine.dispose()
@pytest.fixture
def repo(session_manager):
return UserRepository(manager=session_manager)
class TestUserRepository:
@pytest.mark.asyncio
async def test_save_and_find(self, repo, session_manager):
async with session_manager.transaction():
user = await repo.save(User(name="Alice"))
found = await repo.find_by_id(user.id)
assert found.name == "Alice"Controller Test (HTTP)
import pytest
from httpx import AsyncClient, ASGITransport
@pytest.fixture
async def client(app):
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://test") as c:
yield c
class TestItemController:
@pytest.mark.asyncio
async def test_list_items(self, client):
response = await client.get("/items/")
assert response.status_code == 200
@pytest.mark.asyncio
async def test_create_item(self, client):
response = await client.post("/items/", json={"name": "Test"})
assert response.status_code == 201Container Integration Test
from pico_ioc import init
class TestIntegration:
@pytest.fixture
def container(self):
return init(modules=[__name__])
def test_service_resolves(self, container):
service = container.get(MyService)
assert service is not NoneChecklist
- Unit tests with mocked dependencies
- Happy path and error cases covered
- Async tests use
@pytest.mark.asyncio - Fixtures for reusable setup
- Test naming:
test_<method>_<scenario>
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

