strict-property-accesslisted
Install: claude install-skill xs2tariqrasheed/strict-property-access
# Strict Property Access
This codebase uses a typing system. Data shapes are knowable. Code must be
predictable: every property access uses exactly one, verified name. Fallback
property access ("property resolver" chains) is forbidden because it hides
schema uncertainty inside runtime behavior instead of surfacing it to a human.
## Forbidden patterns
Never generate code that tries multiple names/casings for the same value:
```python
# ALL FORBIDDEN
x = obj.x or obj.X
user_id = data.get("userId") or data.get("user_id") or data.get("id")
name = getattr(o, "name", None) or getattr(o, "Name", None)
```
```typescript
// ALL FORBIDDEN
const id = obj.userId ?? obj.user_id;
const name = res.name || res.Name || "";
const v = (obj as any)["x"] ?? (obj as any)["X"];
```
Also forbidden in the same spirit:
- Casting to `any` / using `# type: ignore` to dodge a property-name error
- Silent defaulting that masks a missing required field (`data.get("id", "")`)
- Normalizing keys speculatively (`{k.lower(): v for k, v in data.items()}`)
just to avoid learning the real casing
## Required behavior instead
Follow these steps in order. Stop at the first one that resolves the name.
### 1. Verify the schema before writing the access
Look up the authoritative source of truth and use the exact name it defines:
- Type definitions: TypeScript interfaces/types, Pydantic models, dataclasses,
protobufs, ORM models, OpenAPI/GraphQL schemas
- The function or endpoint that produces the object
-