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 agentmods add rules/syntaxarc/archipy-plugin/config-and-digit clone --depth 1 https://github.com/SyntaxArc/archipy-pluginWhat 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 | $0.00000 | $0.00651 |
| Opus 5 | $0.00000 | $0.00326 |
| Sonnet 5 | $0.00000 | $0.00130 |
| Haiku 4.5 | $0.00000 | $0.00065 |
Grade A, and why
config-and-di 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Config and Dependency Injection
BaseConfig
import logging
from archipy.configs.base_config import BaseConfig
from archipy.configs.environment_type import EnvironmentType
logger = logging.getLogger(__name__)
class AppConfig(BaseConfig):
"""Application configuration. Inherits ArchiPy sections (REDIS, FASTAPI, GRPC, ...)."""
def customize(self) -> None:
"""Apply service-specific defaults after sources load."""
super().customize()
self.FASTAPI.PROJECT_NAME = "my-service"
self.FASTAPI.RELOAD = self.ENVIRONMENT == EnvironmentType.LOCAL
config = AppConfig()
BaseConfig.set_global(config)
logger.info("Config loaded for environment: %s", config.ENVIRONMENT)
- Call
BaseConfig.set_global(config)once at bootstrap (typically importingapp_configfrom the DI container). - Read elsewhere via
BaseConfig.global_config(). - Document required env vars in
.env.example; never commit secrets. - Env overrides use nested delimiter:
FASTAPI__PROJECT_NAME,FASTAPI__SERVE_PORT, …
FastAPIConfig (config.FASTAPI)
Drives both AppUtils.create_fastapi_app and uvicorn in manage.py:
| Area | Fields |
|---|---|
| Serve | SERVE_HOST, SERVE_PORT, RELOAD, WORKERS_COUNT |
| Proxy | PROXY_HEADERS, FORWARDED_ALLOW_IPS |
| App / docs | PROJECT_NAME, OPENAPI_URL, DOCS_URL, RE_DOC_URL, … |
| Middleware flags | GZIP_MIDDLEWARE_IS_ENABLED, TRUSTED_HOST_MIDDLEWARE_*, HTTPS_REDIRECT_MIDDLEWARE_IS_ENABLED, CORS fields |
Set defaults in customize(); never hardcode host/port/reload for production paths.
gRPC bind (parallel): config.GRPC.SERVE_HOST, config.GRPC.SERVE_PORT.
Dependency Injection
uv add "archipy[dependency-injection]"
- Wire in
configs/containers.pyas providers: ports → adapters → repositories → logics → services. - Depend on ports in business code; override providers in tests with mocks.
- Import
app_configinside the container module soset_globalruns before wiring.
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.
- 2d ago First seen · 75 lines · 651 tokens per session scan A 91fa45cfc6b7
config-and-di is a cursor rule published in the GitHub repository SyntaxArc/archipy-plugin (2 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 651 tokens. 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-08-31.
Other cursor rules, from other repositories
python
Cursor rule "python" from jhl-labs/vibe-project, covering python rules, style guide, naming, imports and order: stdlib → third-party → local.
typescript
TypeScript/JavaScript specific rules.
architecture
Clean Architecture rules.
cursorrules
Cursor rule "cursorrules" from jhl-labs/vibe-project, covering cursor ai rules, ⚠️ deprecation notice, this .cursorrules file format is deprecated, please migrate to the new project rules system and 📁 .cursor/rules/.mdc.
general
General coding rules for all files.
architect
Winston — System Architect agent.