From indenscale-typedown
Expert guidance on writing correct Typedown code, focusing on syntax, best practices, and common pitfalls.
npx claudepluginhub joshuarweaver/cascade-content-creation-misc-1 --plugin indenscale-typedownThis skill uses the workspace's default tool permissions.
This skill provides expert knowledge for writing **Typedown** files (`.td`). Typedown is a Consensus Modeling Language that embeds Pydantic models and Pytest logic into Markdown.
Creates new Angular apps using Angular CLI with flags for routing, SSR, SCSS, prefixes, and AI config. Follows best practices for modern TypeScript/Angular development. Use when starting Angular projects.
Generates Angular code and provides architectural guidance for projects, components, services, reactivity with signals, forms, dependency injection, routing, SSR, ARIA accessibility, animations, Tailwind styling, testing, and CLI tooling.
Conducts multi-round deep research on GitHub repos via API and web searches, generating markdown reports with executive summaries, timelines, metrics, and Mermaid diagrams.
This skill provides expert knowledge for writing Typedown files (.td). Typedown is a Consensus Modeling Language that embeds Pydantic models and Pytest logic into Markdown.
File Structure:
.td file MUST start with a Level 1 Heading (# Title) and a brief textual description. Never start with a code block.Model Blocks (model:<Name>):
model:ClassName block.typing or pydantic inside the block unless it's a specific, non-standard import. The environment pre-loads standard types.class User inside ```model:User).Config Blocks (config):
config.td files only. Do NOT use config blocks in regular .td files.config are automatically exposed to the directory scope and inherited by subdirectories.Entity Blocks & Identifiers:
entity <Type>: <ID>alice) or a slug (user-alice-v1).[[ID]] (Wiki Link) syntax.[[...]]):[[id]]
[[alice]], [[users/alice]][[sha256:...]]
former):When tracking object changes over time:
former: [[<Identifier>]][[]] for the former field.former pointers to ensure historical stability. Globally unique IDs are also acceptable.spec):@target.Typedown is not just a syntax; it is a rigorous method for converting loose natural language into strict systemic consensus. When using Typedown, follow this 5-step cognitive process:
Scan the unstructured text or requirement to identify Key Entities. Immediately instantiate them using entity blocks to fix their existence.
entity:<Type> blocks with YAML content.Analyze the entity blocks you just created. Abstract their common structure into Pydantic models (model).
model:<Type> blocks.config.td or common.td and export them if they are used across multiple files.Analyze the business rules governing these entities. Enforce them using three layers of defense:
EmailStr, PositiveInt).@field_validator or @model_validator for self-contained consistency.spec blocks with @target tags for cross-entity or graph-level validation (e.g., "A specific user must exist in the admin group").If you are unsure about advanced syntax (e.g., how to use former for versioning or tags for filtering):
_reference directory (it is git-ignored).git clone https://github.com/IndenScale/typedown.git _reference/typedown.docs/ or cookbook/01_getting_started/ in the reference to ground your knowledge.Never assume your code is correct. Always verify with the compiler.
uvx typedown check <path> immediately after editing.Step 1: Raw Draft "We need a server 'Alpha' compliant with ISO-27001."
Step 2: Typedown Modeling
class ComplianceStandard(str, Enum):
ISO_27001 = "ISO-27001"
SOC2 = "SOC2"
class Server(BaseModel):
hostname: str
compliance: List[ComplianceStandard]
@model_validator(mode='after')
def check_security(self):
if ComplianceStandard.ISO_27001 in self.compliance:
# Enforce some logic...
pass
return self
hostname: "alpha-01"
compliance:
- "ISO-27001"