Skip to content
Back to skills

Causal

ASecurity

Analyze cause-and-effect relationships in the Semantica knowledge graph — causal chains, interventions, counterfactuals, and causal influence scores.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 17, 2026
developmentpythongonodeapibackend

Works with

  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add karanmrn/karanagentskills --skill causal --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Causal?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Causal
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/karanmrn-causal/badge)](https://www.skillsdirectory.com/skills/karanmrn-causal)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: causal
description: Analyze cause-and-effect relationships in the Semantica knowledge graph — causal chains, interventions, counterfactuals, and causal influence scores.
---

# /semantica:causal

Analyze causal relationships and infer impacts. Usage: `/semantica:causal <task> [args]`

`$ARGUMENTS` = task + optional target entity, filter, or intervention.

---

## `chain [--subject <node>] [--depth N]`

Build and inspect causal chains for a subject or category.

```python
from semantica.context.causal_analyzer import CausalChainAnalyzer
from semantica.context import AgentContext

# Option 1: Use an existing AgentContext decision backend
chain = ctx.get_causal_chain(
    decision_id=decision_id,
    direction="upstream",
    max_depth=depth,
)

# Option 2: Use CausalChainAnalyzer directly
analyzer = CausalChainAnalyzer(graph_store=ctx.knowledge_graph)
downstream = analyzer.get_causal_chain(
    decision_id=decision_id,
    direction="downstream",
    max_depth=depth,
)
```

Output: chain steps, cause strength, effect reach, and summary graph.

---

## `intervene <node> <action> [--scenario <json>]`

Analyze decision impact and influenced decisions (current causal API).

```python
analyzer = CausalChainAnalyzer(graph_store=ctx.knowledge_graph)
impact_score = analyzer.get_causal_impact_score(decision_id=decision_id)
influenced = analyzer.get_influenced_decisions(
    decision_id=decision_id,
    max_depth=depth,
)
``` 

Return: impact score, influenced decisions, and downstream scope.

---

## `counterfactual <fact> [--weight N]`

Trace root causes and temporal causal paths.

```python
analyzer = CausalChainAnalyzer(graph_store=ctx.knowledge_graph)
roots = analyzer.find_root_causes(decision_id=decision_id, max_depth=depth)
historical_chain = analyzer.trace_at_time(
    event_id=decision_id,
    at_time="2026-01-01T00:00:00Z",
    direction="upstream",
    max_depth=depth,
)
```

Output: root decision lineage and time-bounded causal context.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.