[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E46FPPV73DABJH7M9QP399":3,"skill-same:01M7E46FPPV73DABJH7M9QP399":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7E46FPPV73DABJH7M9QP399","writing-tests-pg-data",null,"Instructions for writing tests for PG Data services, likely involving database fixtures and integration tests.","agent-ix\u002Fdev-tools","agent-ix","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F145821095?v=4","01M7E4526WF8Z68B9YYXN4SQDP","Agent IX","01M7E4527XCPGPR5HK7ZY9PG03",0,"MIT","https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-tests-pg-data\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: writing-tests-pg-data\ndescription: Instructions for writing tests for PG Data services, likely involving database fixtures and integration tests.\n---\n\n# Writing PG Data Tests\n\nIf this plugin is not initialized or an Agent IX command fails, read [the dev-tools setup guide](https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools\u002Fblob\u002Fmain\u002Fsetup.md) for its prerequisites and local diagnosis.\n\nThis skill provides guidelines for writing tests for services using `SQLModel` and `postgres`, aligned with the Agent-IX Golden Path.\n\n**Source Spec**: Derived from `pg-data-service` (SQLModel, Alembic).\n\n## Core Rules\n\n1.  **Framework**: Use `pytest-sqlmodel`. This plugin provides all necessary fixtures and database management.\n2.  **Real Database**: Tests must ALWAYS run against a real Postgres database managed by the `postgres` fixture. Do not use SQLite\u002Fin-memory databases.\n3.  **Isolation**: The `db_session` fixture provided by `pytest-sqlmodel` handles transaction isolation (rollbacks) automatically.\n4.  **Factories**: Use helper functions (factories) to create test data rather than raw SQL inserts.\n\n## Fixtures\n\nStandard fixtures used in `conftest.py` (provided by `pytest-sqlmodel`):\n\n-   `db_session`: A `Session` object isolated by a transaction. Use this for DB interactions in tests.\n-   `postgres`: The underlying `testcontainers` or service-managed postgres instance URL.\n-   `client`: A `TestClient` with the session dependency overridden to use `db_session`.\n\n## Testing Models\n\nTest that models can be created and retrieved.\n\n```python\nclass TestHeroModel:\n    \"\"\"Tests for the Hero model.\"\"\"\n\n    def test_create_hero(self, session: Session):\n        \"\"\"\n        Description:\n            Test that a Hero can be created and persisted.\n        \n        Assumptions:\n            - Database is available\n            - Session is active\n            \n        Criteria:\n            - Hero is saved with a generated ID\n            - Fields match input values\n\n        Trace: FR-001-AC-1\n        \"\"\"\n        hero = Hero(name=\"Deadpond\", secret_name=\"Dive Wilson\")\n        session.add(hero)\n        session.commit()\n        session.refresh(hero)\n        \n        assert hero.id is not None\n        assert hero.age is None\n```\n\n## Testing API Endpoints\n\nTest that endpoints interact correctly with the DB.\n\n```python\nclass TestHeroAPI:\n    \"\"\"Tests for the Hero API endpoints.\"\"\"\n\n    def test_create_hero_api(self, client: TestClient):\n        \"\"\"\n        Description:\n            Test the create hero POST endpoint.\n        \n        Assumptions:\n            - API is running\n            - Database connection is valid\n            \n        Criteria:\n            - Returns 200 OK\n            - Response contains created hero with ID\n        \"\"\"\n        response = client.post(\n            \"\u002Fheroes\u002F\",\n            json={\"name\": \"Spider-Boy\", \"secret_name\": \"Pedro Parqueador\"}\n        )\n        data = response.json()\n        \n        assert response.status_code == 200\n        assert data[\"name\"] == \"Spider-Boy\"\n        assert data[\"id\"] is not None\n```\n","# Writing PG Data Tests\n\nIf this plugin is not initialized or an Agent IX command fails, read [the dev-tools setup guide](https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools\u002Fblob\u002Fmain\u002Fsetup.md) for its prerequisites and local diagnosis.\n\nThis skill provides guidelines for writing tests for services using `SQLModel` and `postgres`, aligned with the Agent-IX Golden Path.\n\n**Source Spec**: Derived from `pg-data-service` (SQLModel, Alembic).\n\n## Core Rules\n\n1.  **Framework**: Use `pytest-sqlmodel`. This plugin provides all necessary fixtures and database management.\n2.  **Real Database**: Tests must ALWAYS run against a real Postgres database managed by the `postgres` fixture. Do not use SQLite\u002Fin-memory databases.\n3.  **Isolation**: The `db_session` fixture provided by `pytest-sqlmodel` handles transaction isolation (rollbacks) automatically.\n4.  **Factories**: Use helper functions (factories) to create test data rather than raw SQL inserts.\n\n## Fixtures\n\nStandard fixtures used in `conftest.py` (provided by `pytest-sqlmodel`):\n\n-   `db_session`: A `Session` object isolated by a transaction. Use this for DB interactions in tests.\n-   `postgres`: The underlying `testcontainers` or service-managed postgres instance URL.\n-   `client`: A `TestClient` with the session dependency overridden to use `db_session`.\n\n## Testing Models\n\nTest that models can be created and retrieved.\n\n```python\nclass TestHeroModel:\n    \"\"\"Tests for the Hero model.\"\"\"\n\n    def test_create_hero(self, session: Session):\n        \"\"\"\n        Description:\n            Test that a Hero can be created and persisted.\n        \n        Assumptions:\n            - Database is available\n            - Session is active\n            \n        Criteria:\n            - Hero is saved with a generated ID\n            - Fields match input values\n\n        Trace: FR-001-AC-1\n        \"\"\"\n        hero = Hero(name=\"Deadpond\", secret_name=\"Dive Wilson\")\n        session.add(hero)\n        session.commit()\n        session.refresh(hero)\n        \n        assert hero.id is not None\n        assert hero.age is None\n```\n\n## Testing API Endpoints\n\nTest that endpoints interact correctly with the DB.\n\n```python\nclass TestHeroAPI:\n    \"\"\"Tests for the Hero API endpoints.\"\"\"\n\n    def test_create_hero_api(self, client: TestClient):\n        \"\"\"\n        Description:\n            Test the create hero POST endpoint.\n        \n        Assumptions:\n            - API is running\n            - Database connection is valid\n            \n        Criteria:\n            - Returns 200 OK\n            - Response contains created hero with ID\n        \"\"\"\n        response = client.post(\n            \"\u002Fheroes\u002F\",\n            json={\"name\": \"Spider-Boy\", \"secret_name\": \"Pedro Parqueador\"}\n        )\n        data = response.json()\n        \n        assert response.status_code == 200\n        assert data[\"name\"] == \"Spider-Boy\"\n        assert data[\"id\"] is not None\n```\n",{"name":5,"description":7},"main","85e048be7fde15074feb0ddd1233b5b720ad9113","skills\u002Fwriting-tests-pg-data","https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools","https:\u002F\u002Fgithub.com\u002Fagent-ix","http:\u002F\u002Fagent-ix.ai","Agent IX - Agentic engineering tools","2026-11-15 03:01:01",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add agent-ix\u002Fdev-tools --skill writing-tests-pg-data",{"tool":38,"command":39},"bunx","bunx skills add agent-ix\u002Fdev-tools --skill writing-tests-pg-data",{"tool":41,"command":42},"pnpm","pnpm dlx skills add agent-ix\u002Fdev-tools --skill writing-tests-pg-data","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-tests-pg-data\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7E471SM5GZ57TV0ZTVYDJJS","assurance-onboarding","Capture a generic handoff in the fixture host.","https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools\u002Fblob\u002Fmain\u002Ftests\u002Fnew-project\u002Ffixtures\u002Fengineering-assurance\u002Fskills\u002Fassurance-onboarding\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7E46XFTX3A7X3HM5EYYWG7B","writing-tests-typescript","Instructions for writing TypeScript tests (Jest), including typed mocks and testing patterns.","https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-tests-typescript\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7E46RVDSBTKABHD03PS3JNZ","writing-tests-react","Index to React component testing guides.","https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-tests-react\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7E46M1TM645NGNVQ0V3HHHG","writing-tests-python","Instructions for writing Python tests (pytest), including mocking, fixtures, and golden path standards.","https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-tests-python\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7E46ACWS94570P6SCTS5856","security-deepsec","Run a generic DeepSec-backed security review and remediation burndown for one or more target repositories. Use when asked to audit a repo, app area, service family, frontend\u002Fbackend\u002Fclient\u002FSDK surface, infrastructure, or security-sensitive workflow with DeepSec; when asked to create local audit artifacts, GitHub security issues, checksite coverage, finding reports, spec\u002FAC\u002Ftest traceability, or a repeatable security burndown process.","https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools\u002Fblob\u002Fmain\u002Fskills\u002Fsecurity-deepsec\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7E466XK687Z576R0PP4AVDM","rust-style","Agent IX Rust conventions for every Rust coding and review task. Load this baseline even when the repository has additional Rust guidance; read the linked API, implementation, safety, boundary, testing, and Tokio references for the work at hand.","https:\u002F\u002Fgithub.com\u002Fagent-ix\u002Fdev-tools\u002Fblob\u002Fmain\u002Fskills\u002Frust-style\u002FSKILL.md",[],[]]