[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79GQPKH7F1DMNCQMS8BMWB8":3,"skill-same:01M79GQPKH7F1DMNCQMS8BMWB8":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M79GQPKH7F1DMNCQMS8BMWB8","redis-search",null,"Scaffold RediSearch full-text, vector, or search-cache adapters in an ArchiPy app. Use for \"add search\", \"full-text\u002Fsemantic\u002Fvector search\", \"embeddings index\", or \"cache search results\".","SyntaxArc\u002Farchipy-plugin","SyntaxArc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F199446442?v=4","01M79GPX74Y0R3C1MTXHETZZYF","01M79GPX7S33ZRJ5935EQ3JRPN",3,"MIT","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fredis-search\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: redis-search\ndescription: >-\n  Scaffold RediSearch full-text, vector, or search-cache adapters in an ArchiPy app. Use\n  for \"add search\", \"full-text\u002Fsemantic\u002Fvector search\", \"embeddings index\", or \"cache\n  search results\".\n---\n\n# Redis Search Skills\n\n## Overview\n\nRedis search via ArchiPy (`archipy[redis]`):\n\n- **RediSearch**: full-text via `RedisAdapter.search_index(name)` → `RedisSearchHandle`\n- **Vector search**: KNN \u002F range via `SearchQueryDTO.from_knn` \u002F `from_range`\n- **Search caching**: cache-aside around expensive search results\n\nCanonical layout and ArchiPy constraints: `..\u002Farchipy-docs\u002Freference\u002Fadapters.md` (Adapters + Redis Search), resolved relative\nto this `SKILL.md`'s directory in the plugin installation — not the app workspace. Templates:\n`reference\u002Ffulltext_adapter.py`, `reference\u002Fvector_adapter.py`, `reference\u002Fsearch_cache_adapter.py`.\n\nResolve files under `reference\u002F` relative to this `SKILL.md` in the plugin installation\n(`$PLUGIN_ROOT\u002Fskills\u002Fredis-search\u002F`, `$CURSOR_PLUGIN_ROOT\u002Fskills\u002Fredis-search\u002F`, or `${CLAUDE_SKILL_DIR}\u002F`). These are plugin templates,\nnot app-relative paths. Copy and adapt them into the app; never edit the plugin copies.\n\n## Read first\n\nRead these plugin rules in full before generating files (paths relative to this skill directory; Claude Code: `${CLAUDE_SKILL_DIR}\u002F..\u002F..\u002Frules\u002F`):\n\n- `..\u002F..\u002Frules\u002Fusing-archipy-adapters.mdc`\n\n## Before writing files\n\n1. Inspect the domain, Redis config\u002Fadapters, DTOs, index naming, key prefixes, DI wiring, and tests.\n2. Infer data structure, sync\u002Fasync style, and existing search conventions.\n3. Ask only for unresolved choices: search type, domain, query behavior, and vector dimension\u002Fmetric when applicable.\n4. Preserve existing indexes and adapters. Treat schema or prefix changes as migrations; do not silently replace them.\n\n## Prefer ArchiPy\n\n```bash\nuv add \"archipy[redis]\"\n```\n\nThin domain wrapper around `RedisAdapter.search_index()` — **not** raw `client.ft()`.\n\nKey library symbols:\n\n- `RedisAdapter.search_index(name)` \u002F `list_search_indexes()`\n- DTOs: `IndexSchemaDTO`, `TextFieldConfig`, `TagFieldConfig`, `NumericFieldConfig`, `VectorFieldConfig`\n- Queries: `SearchQueryDTO`, `SearchQueryDTO.from_knn(...)`, `SearchQueryDTO.from_range(...)`\n- Documents: `HashDocumentUpsertDTO`, `JsonDocumentUpsertDTO`\n- Types: `RedisIndexType`, `VectorAlgorithm`, `VectorDistanceMetric`, …\n- Helpers: `pack_vector` \u002F `unpack_vector` from `archipy.adapters.redis.search`\n\nRequires **Redis 8+** (query engine). Cluster needs hash-tagged prefixes (e.g. `{products}:`).\n\n## Generate\n\n```text\nrepositories\u002F\u003Cdomain>\u002F\n├── adapters\u002F\n│   └── \u003Cdomain>_search_adapter.py      # or _vector_ \u002F _search_cache_\n└── \u003Cdomain>_repository.py\n```\n\n1. Copy the matching template from `reference\u002F`, rename class\u002Findex\u002Fprefix to the domain.\n2. Define a domain error (e.g. `ProductSearchError`) under `models\u002Ferrors\u002F` — templates import it.\n3. Wire via DI in `configs\u002Fcontainers.py`.\n4. Map Redis\u002FRediSearch failures with `raise DomainError(...) from e`.\n\n### Full-text\n\nUse `reference\u002Ffulltext_adapter.py`: `ensure_index` via `info()` → `create_index(IndexSchemaDTO, …)` only when missing;\nsearch via `handle.search(SearchQueryDTO(...))`.\n\n### Vector\n\nUse `reference\u002Fvector_adapter.py`: `VectorFieldConfig` + `SearchQueryDTO.from_knn`. Adjust `DIM` \u002F algorithm.\n\n### Search caching\n\nUse `reference\u002Fsearch_cache_adapter.py`: cache-aside with Redis get\u002Fsetex. Repository orchestrates search + cache;\nlogics own invalidation rules.\n\n## Do not\n\n- Sync and async must be separate classes.\n- No business logic in adapters — map data and talk to infrastructure only.\n- Do **not** create a top-level `adapters\u002F\u003Cname>\u002F` package — domain adapters live under repositories.\n- Prefer ArchiPy search handle API; only drop to raw Redis for operations the handle does not cover.\n- Use specific exceptions; always `raise ... from e`.\n- Prefer the ArchiPy search-handle API — never raw `client.ft()` for operations the handle covers.\n\n## Verify\n\n1. Run formatter\u002Flinter, then Behave scenarios (`@needs-redis`, `\u002Fscaffold-bdd`) that hit the search endpoint for\n   matches, empty results, and mapped failures.\n2. For vector search, verify encoded vector dimension and distance metric match the schema.\n3. If Docker is unavailable, say so; do not replace the Redis container with a mock.\n4. Run the `archipy-reviewer` subagent on the changes and fix every **Must fix** finding it reports.\n5. Report files, schema assumptions, dependency changes, and commands run.\n\n## Docs\n\n- https:\u002F\u002Fsyntaxarc.github.io\u002FArchiPy\u002Ftutorials\u002Fadapters\u002F (Redis Search section)\n- https:\u002F\u002Fsyntaxarc.github.io\u002FArchiPy\u002Fapi_reference\u002Fadapters\u002F\n- Bundled: `..\u002Farchipy-docs\u002Freference.md`\n","# Redis Search Skills\n\n## Overview\n\nRedis search via ArchiPy (`archipy[redis]`):\n\n- **RediSearch**: full-text via `RedisAdapter.search_index(name)` → `RedisSearchHandle`\n- **Vector search**: KNN \u002F range via `SearchQueryDTO.from_knn` \u002F `from_range`\n- **Search caching**: cache-aside around expensive search results\n\nCanonical layout and ArchiPy constraints: `..\u002Farchipy-docs\u002Freference\u002Fadapters.md` (Adapters + Redis Search), resolved relative\nto this `SKILL.md`'s directory in the plugin installation — not the app workspace. Templates:\n`reference\u002Ffulltext_adapter.py`, `reference\u002Fvector_adapter.py`, `reference\u002Fsearch_cache_adapter.py`.\n\nResolve files under `reference\u002F` relative to this `SKILL.md` in the plugin installation\n(`$PLUGIN_ROOT\u002Fskills\u002Fredis-search\u002F`, `$CURSOR_PLUGIN_ROOT\u002Fskills\u002Fredis-search\u002F`, or `${CLAUDE_SKILL_DIR}\u002F`). These are plugin templates,\nnot app-relative paths. Copy and adapt them into the app; never edit the plugin copies.\n\n## Read first\n\nRead these plugin rules in full before generating files (paths relative to this skill directory; Claude Code: `${CLAUDE_SKILL_DIR}\u002F..\u002F..\u002Frules\u002F`):\n\n- `..\u002F..\u002Frules\u002Fusing-archipy-adapters.mdc`\n\n## Before writing files\n\n1. Inspect the domain, Redis config\u002Fadapters, DTOs, index naming, key prefixes, DI wiring, and tests.\n2. Infer data structure, sync\u002Fasync style, and existing search conventions.\n3. Ask only for unresolved choices: search type, domain, query behavior, and vector dimension\u002Fmetric when applicable.\n4. Preserve existing indexes and adapters. Treat schema or prefix changes as migrations; do not silently replace them.\n\n## Prefer ArchiPy\n\n```bash\nuv add \"archipy[redis]\"\n```\n\nThin domain wrapper around `RedisAdapter.search_index()` — **not** raw `client.ft()`.\n\nKey library symbols:\n\n- `RedisAdapter.search_index(name)` \u002F `list_search_indexes()`\n- DTOs: `IndexSchemaDTO`, `TextFieldConfig`, `TagFieldConfig`, `NumericFieldConfig`, `VectorFieldConfig`\n- Queries: `SearchQueryDTO`, `SearchQueryDTO.from_knn(...)`, `SearchQueryDTO.from_range(...)`\n- Documents: `HashDocumentUpsertDTO`, `JsonDocumentUpsertDTO`\n- Types: `RedisIndexType`, `VectorAlgorithm`, `VectorDistanceMetric`, …\n- Helpers: `pack_vector` \u002F `unpack_vector` from `archipy.adapters.redis.search`\n\nRequires **Redis 8+** (query engine). Cluster needs hash-tagged prefixes (e.g. `{products}:`).\n\n## Generate\n\n```text\nrepositories\u002F\u003Cdomain>\u002F\n├── adapters\u002F\n│   └── \u003Cdomain>_search_adapter.py      # or _vector_ \u002F _search_cache_\n└── \u003Cdomain>_repository.py\n```\n\n1. Copy the matching template from `reference\u002F`, rename class\u002Findex\u002Fprefix to the domain.\n2. Define a domain error (e.g. `ProductSearchError`) under `models\u002Ferrors\u002F` — templates import it.\n3. Wire via DI in `configs\u002Fcontainers.py`.\n4. Map Redis\u002FRediSearch failures with `raise DomainError(...) from e`.\n\n### Full-text\n\nUse `reference\u002Ffulltext_adapter.py`: `ensure_index` via `info()` → `create_index(IndexSchemaDTO, …)` only when missing;\nsearch via `handle.search(SearchQueryDTO(...))`.\n\n### Vector\n\nUse `reference\u002Fvector_adapter.py`: `VectorFieldConfig` + `SearchQueryDTO.from_knn`. Adjust `DIM` \u002F algorithm.\n\n### Search caching\n\nUse `reference\u002Fsearch_cache_adapter.py`: cache-aside with Redis get\u002Fsetex. Repository orchestrates search + cache;\nlogics own invalidation rules.\n\n## Do not\n\n- Sync and async must be separate classes.\n- No business logic in adapters — map data and talk to infrastructure only.\n- Do **not** create a top-level `adapters\u002F\u003Cname>\u002F` package — domain adapters live under repositories.\n- Prefer ArchiPy search handle API; only drop to raw Redis for operations the handle does not cover.\n- Use specific exceptions; always `raise ... from e`.\n- Prefer the ArchiPy search-handle API — never raw `client.ft()` for operations the handle covers.\n\n## Verify\n\n1. Run formatter\u002Flinter, then Behave scenarios (`@needs-redis`, `\u002Fscaffold-bdd`) that hit the search endpoint for\n   matches, empty results, and mapped failures.\n2. For vector search, verify encoded vector dimension and distance metric match the schema.\n3. If Docker is unavailable, say so; do not replace the Redis container with a mock.\n4. Run the `archipy-reviewer` subagent on the changes and fix every **Must fix** finding it reports.\n5. Report files, schema assumptions, dependency changes, and commands run.\n\n## Docs\n\n- https:\u002F\u002Fsyntaxarc.github.io\u002FArchiPy\u002Ftutorials\u002Fadapters\u002F (Redis Search section)\n- https:\u002F\u002Fsyntaxarc.github.io\u002FArchiPy\u002Fapi_reference\u002Fadapters\u002F\n- Bundled: `..\u002Farchipy-docs\u002Freference.md`\n",{"name":5,"description":7},"main","60b791bf9902a80e9a0bbac9d7cf04ea5c559af0","skills\u002Fredis-search",1,"https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin","https:\u002F\u002Fsyntaxarc.github.io\u002FArchiPy\u002F","https:\u002F\u002Fgithub.com\u002FSyntaxArc","A structured, modern approach to development.","2026-11-07 21:30:40",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add SyntaxArc\u002Farchipy-plugin --skill redis-search",{"tool":38,"command":39},"bunx","bunx skills add SyntaxArc\u002Farchipy-plugin --skill redis-search",{"tool":41,"command":42},"pnpm","pnpm dlx skills add SyntaxArc\u002Farchipy-plugin --skill redis-search","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fredis-search\u002FSKILL.md",true,[46,52,56],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"reference\u002Ffulltext_adapter.py","SCRIPT","脚本",2747,"https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fredis-search\u002Freference\u002Ffulltext_adapter.py",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"reference\u002Fsearch_cache_adapter.py",1657,"https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fredis-search\u002Freference\u002Fsearch_cache_adapter.py",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"reference\u002Fvector_adapter.py",2598,"https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fredis-search\u002Freference\u002Fvector_adapter.py",[61,68,75,82,89,96],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M79GRZRMZGQ4N8DZY0JQ1TYC","scaffold-utils","Add or wire pure helpers\u002Futils, preferring ArchiPy utils (datetime, JWT, password, file, string). Use for \"add a helper\u002Futil function\", \"format dates\", \"hash passwords\", or \"generate tokens\".","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-utils\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M79GRWMT4CC0MEQNWPJF3MA3","scaffold-service","Scaffold a thin FastAPI router or gRPC servicer under services\u002F{domain}\u002Fv{n}\u002F with AppUtils bootstrap. Use for \"add an endpoint\u002Froute\u002FAPI\", \"expose via REST\u002FgRPC\", or \"new API version\".","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-service\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M79GRSR9RZBGFSHY8F0G4Z95","scaffold-observability","Configure ArchiPy 5.x OpenTelemetry traces, metrics, logs, and instrumentation. Use for \"add tracing\u002Fmetrics\u002FOTel\", \"Prometheus\u002FPushgateway\", or migrating off Sentry, Elastic APM, or old Prometheus.","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-observability\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M79GRPK6B0S157614VXJCW5Y","scaffold-models","Scaffold ArchiPy models under models\u002F: domain\u002Frepository DTOs, errors, optional entities and types. Use for \"add DTO\u002Fschema\u002Frequest\u002Fresponse model\", \"new error type\", or \"SQLAlchemy entity\".","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-models\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M79GRK8F6RZPX6V4EA24379G","scaffold-logic","Scaffold an ArchiPy logic (use case) under logics\u002F{domain}\u002F with a unit-of-work decorator and DTO I\u002FO. Use for \"add business logic\", \"new use case\", \"transactional operation\", or \"service layer method\".","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-logic\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":18},"01M79GRF6HFDN1RZMPZJM54TGR","scaffold-interceptor","Add or wire cross-cutting FastAPI\u002FgRPC interceptors or middleware, preferring ArchiPy's. Use for \"add middleware\", \"request ID\u002Flogging\u002Fauth interceptor\", or \"gRPC interceptor\".","https:\u002F\u002Fgithub.com\u002FSyntaxArc\u002Farchipy-plugin\u002Fblob\u002Fmain\u002Fskills\u002Fscaffold-interceptor\u002FSKILL.md",[],[]]