Agent skill

Troubleshooting

by cartography-cncf in cartography-cncf/cartography

Diagnose and fix common Cartography intel-module errors — ModuleNotFoundError, PropertyRef validation failed, GraphJob failed, missing relationships, MatchLink misses, cleanup deleting too much…

Apache-2.0Auto-check passedDatabases

Install Troubleshooting

skills CLI
$ npx skills add cartography-cncf/cartography --skill troubleshooting -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cartography-cncf/cartography troubleshooting --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cartography-cncf/cartography.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/troubleshooting .claude/skills/troubleshooting && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
troubleshooting
GitHub stars
4.1k
Token cost
~2.5k tokens
SKILL.md length
418 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
Apache-2.0

At a glance

Diagnose and fix common Cartography intel-module errors — ModuleNotFoundError, PropertyRef validation failed, GraphJob failed, missing relationships, MatchLink misses, cleanup deleting too much…

  • Works in 3 steps: Check the target node label matches… → Verify target_node_matcher keys match… → Ensure the value in your data dict or…
  • The user reports an error while developing
  • SKILL.md covers Common issues and solutions, Debugging tips, Key files and Test utilities, plus 2 more sections
  • Calls node

What it does

Troubleshooting is an agent skill from cartography-cncf/cartography. Diagnose and fix common Cartography intel-module errors — ModuleNotFoundError, PropertyRef validation failed, GraphJob failed, missing relationships, MatchLink misses, cleanup deleting too much, slow queries, ignored custom schema fields, key errors during transform. Use when the user reports an error while developing or running a Cartography module.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Query optimization. The repository describes itself as: Cartography is a Python tool that pulls infrastructure assets and their relationships into a Neo4j graph database. The licence is Apache-2.0.

When your agent uses it

  • The user reports an error while developing
  • Running a Cartography module

Example prompts

  • “/troubleshooting”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Check the target node label matches exactly.
  2. Verify target_node_matcher keys match the target node's property names.
  3. Ensure the value in your data dict or kwargs is not None.

What it can do on your machine

Read from SKILL.md and the folder at commit e345364. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Troubleshooting loads about 2.5k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 418 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cartography-cncf/cartography at commit e345364, republished under its Apache-2.0 licence (© cartography-cncf). 418 words, ~2,490 tokens.

Download SKILL.mdSave it as .claude/skills/troubleshooting/SKILL.md (or your agent's skills folder).
name
troubleshooting
description
Diagnose and fix common Cartography intel-module errors — `ModuleNotFoundError`, `PropertyRef validation failed`, `GraphJob failed`, missing relationships, MatchLink misses, cleanup deleting too much, slow queries, ignored custom schema fields, key errors during transform. Use when the user reports an error while developing or running a Cartography module.

troubleshooting

Diagnostic playbook for the most common errors encountered while developing Cartography intel modules.

Common issues and solutions

Import errors
python
# Problem: ModuleNotFoundError for your new module
# Solution: ensure __init__.py files exist in all directories
cartography/intel/your_service/__init__.py
cartography/models/your_service/__init__.py

Checklist:

  • __init__.py exists in cartography/intel/your_service/
  • __init__.py exists in cartography/models/your_service/
  • Module is imported in the parent __init__.py if needed
Schema validation errors
python
# Problem: "PropertyRef validation failed"
# Solution: check dataclass syntax and PropertyRef definitions
@dataclass(frozen=True)  # do not forget frozen=True
class YourNodeProperties(CartographyNodeProperties):
    id: PropertyRef = PropertyRef("id")  # must have type annotation
    lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)

Common causes:

  • Missing frozen=True in @dataclass.
  • Missing type annotation (: PropertyRef).
  • Typo in the PropertyRef field name.
Relationship connection issues
python
# Problem: relationships not created
# Solution: ensure target nodes exist before creating relationships

# Load parent nodes first:
load(neo4j_session, TenantSchema(), tenant_data, lastupdated=update_tag)

# Then load child nodes with relationships:
load(neo4j_session, UserSchema(), user_data, lastupdated=update_tag, TENANT_ID=tenant_id)

Debugging steps:

  1. Check the target node label matches exactly.
  2. Verify target_node_matcher keys match the target node's property names.
  3. Ensure the value in your data dict or kwargs is not None.
Cleanup job failures
python
# Problem: "GraphJob failed" during cleanup
# Solution: check common_job_parameters
common_job_parameters = {
    "UPDATE_TAG": config.update_tag,  # must match what is set on nodes
    "TENANT_ID": tenant_id,           # if using scoped cleanup (default)
}
python
# Problem: cleanup deletes too much (wrong scoped_cleanup setting)
# Solution: verify scoped_cleanup is appropriate

@dataclass(frozen=True)
class MySchema(CartographyNodeSchema):
    # tenant-scoped resources — default, do not specify
    # scoped_cleanup: bool = True

    # global resources only — rare
    scoped_cleanup: bool = False  # vuln data, threat intel, etc.

For details on when to override scoped_cleanup, see the add-node-type skill.

Data transform issues
python
# Problem: KeyError during transform
# Solution: handle required vs optional fields correctly
{
    "id": data["id"],              # required — let it fail
    "name": data.get("name"),      # optional
    # avoid empty-string defaults — they hide missing data
    # "email": data.get("email", ""),
    "email": data.get("email"),    # use None default
}
Schema definition issues
python
# Problem: adding custom fields to schema classes
# Solution: remove them — only standard fields are recognised

@dataclass(frozen=True)
class MyRel(CartographyRelSchema):
    # Remove custom fields — they are silently ignored:
    # conditional_match_property: str = "some_field"
    # custom_flag: bool = True
    # extra_config: dict = {}

    # Keep only the standard relationship fields
    target_node_label: str = "TargetNode"
    target_node_matcher: TargetNodeMatcher = make_target_node_matcher(...)
    direction: LinkDirection = LinkDirection.OUTWARD
    rel_label: str = "CONNECTS_TO"
    properties: MyRelProperties = MyRelProperties()

For the standard schema fields, see the add-node-type skill.

Performance issues
python
# Problem: slow queries
# Solution: index frequently queried fields
email: PropertyRef = PropertyRef("email", extra_index=True)

# Query on indexed fields when possible
MATCH (u:User {id: $user_id})  # good — id is always indexed
MATCH (u:User {name: $name})   # bad — name might not be indexed

Fields used inside a target_node_matcher are indexed automatically.

python
# Problem: MatchLinks not creating relationships
# Solution: both source and target nodes must exist first

load(neo4j_session, SourceNodeSchema(), source_data, ...)   # 1. source nodes
load(neo4j_session, TargetNodeSchema(), target_data, ...)   # 2. target nodes

load_matchlinks(                                            # 3. then MatchLinks
    neo4j_session,
    YourMatchLinkSchema(),
    mapping_data,
    lastupdated=update_tag,
    _sub_resource_label="AWSAccount",
    _sub_resource_id=account_id,
)
python
# Problem: MatchLink cleanup not working
# Solution: use GraphJob.from_matchlink with the right args
GraphJob.from_matchlink(
    YourMatchLinkSchema(),
    "AWSAccount",                          # _sub_resource_label
    common_job_parameters["AWS_ID"],       # _sub_resource_id
    common_job_parameters["UPDATE_TAG"],   # update_tag
).run(neo4j_session)

For full MatchLink details, see the add-relationship skill.

Debugging tips

  1. Check existing patterns first. Look at similar modules in cartography/intel/ before inventing new ones.
  2. Verify imports. All CartographyNodeSchema / CartographyRelSchema imports must point to cartography.models.core.*.
  3. Test transform functions with real API responses.
  4. Validate Cypher in Neo4j Browser when relationships are not appearing.
  5. Check file naming. Module files should match the service name (cartography/intel/lastpass/users.py).
  6. Run tests incrementally. After each change, run the integration test.
  7. Test through sync(), not isolated load() calls.
Show full SKILL.md (198 more words)Show less

Key files

FilePurpose
cartography/client/core/tx.pyCore load() and load_matchlinks() — query generation lives here
cartography/graph/job.pyGraphJob cleanup operations
cartography/models/core/common.pyPropertyRef definition
cartography/models/core/nodes.pyCartographyNodeSchema, CartographyNodeProperties, ExtraNodeLabels, etc.
cartography/models/core/relationships.pyCartographyRelSchema, LinkDirection, matchers, MatchLinks
cartography/config.pyConfig object — check missing fields here
cartography/cli.pyTyper CLI with help panels
cartography/data/indexes.cypherManual index definitions (legacy)
cartography/data/jobs/cleanup/Legacy cleanup JSON files
cartography/analysis/*/analysis.pyTyped analysis jobs (see analysis-jobs skill)
cartography/data/jobs/analysis/Legacy migration/cleanup JSON jobs
cartography/data/jobs/scoped_analysis/Legacy scoped migration/cleanup JSON jobs

Test utilities

python
from tests.integration.util import check_nodes, check_rels


# Nodes
expected_nodes = {
    ("user-123", "alice@example.com"),
    ("user-456", "bob@example.com"),
}
assert check_nodes(neo4j_session, "YourServiceUser", ["id", "email"]) == expected_nodes


# Relationships
expected_rels = {
    ("user-123", "tenant-123"),
    ("user-456", "tenant-123"),
}
assert check_rels(
    neo4j_session,
    "YourServiceUser", "id",
    "YourServiceTenant", "id",
    "RESOURCE",
    rel_direction_right=True,
) == expected_rels

Error message reference

Error messageLikely causeSolution
PropertyRef validation failedMissing type annotation or frozen=TrueCheck dataclass definition
Node not found for relationshipTarget node does not existLoad parent nodes first
GraphJob failedWrong common_job_parametersCheck UPDATE_TAG and tenant ID
KeyError: 'field_name'Required field missing in API responseUse .get() for optional fields
ModuleNotFoundErrorMissing __init__.pyAdd __init__.py to all directories
Relationship not createdMatcher property mismatchVerify property names match exactly

When to ask for help

Stop and ask the user when:

  • Legacy Cypher queries contain unclear business logic.
  • Complex relationships do not map clearly to the data model.
  • Tests keep failing after multiple attempts.
  • Multiple modules look interdependent.
  • Performance issues persist after adding indexes.
  • The graph contains unexpected data after sync.

© cartography-cncf, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/troubleshooting of cartography-cncf/cartography.

Open the folder on GitHubat commit e345364

Compare with similar skills

Troubleshooting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Troubleshooting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Troubleshooting this skillcartography-cncf/cartography4.1k—~2.5kAutomated safety check: PassApache-2.0
SQL Optimization Patternsynulihao/AgentSkillOS61711 repos~3.3kAutomated safety check: PassNone
Cloud Trace Queryinggoogle/skills21k—~1.7kAutomated safety check: PassApache-2.0
Query Engine Designrevfactory/claude-code-harness120—~474Automated safety check: PassNone
Query Plan Snapshot CLIeclipse-rdf4j/rdf4j420—~1.5kAutomated safety check: PassBSD-3-Clause
Wp Acf And Content Modelingjorgerosal/wordpress-skills102—~3.2kAutomated safety check: PassMIT

Similar skills

  • SQL Optimization Patterns

    ynulihao/AgentSkillOS

    Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.

    617 GitHub starsUsed in 11 repos~3.3k tokens
    DatabasesAuto-check passed
  • Official

    Query Cloud Trace spans, filter by latency thresholds or error status, correlate distributed traces with Cloud Logging, and diagnose latency bottlenecks across Google Cloud services.

    21k GitHub stars~1.7k tokensUpdated today
    DatabasesAuto-check passed
  • Query Engine Design

    revfactory/claude-code-harness

    SQL query engine design and implementation guide. An agent skill from revfactory/claude-code-harness.

    120 GitHub stars~474 tokensUpdated 7 mo ago
    DatabasesAuto-check passed
  • Query Plan Snapshot CLI

    eclipse-rdf4j/rdf4j

    Use QueryPlanSnapshotCli to capture and compare RDF4J query plans, then assess likely performance improvements/regressions from execution verification and semantic plan diffs.

    420 GitHub stars~1.5k tokensUpdated today
    DatabasesAuto-check passed
  • Wp Acf And Content Modeling

    jorgerosal/wordpress-skills

    WordPress ACF and content modeling review. An agent skill from jorgerosal/wordpress-skills.

    102 GitHub stars~3.2k tokensUpdated 4 mo ago
    DatabasesAuto-check passed
  • Jpa Patterns

    affaan-m/ECC

    JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

    276k GitHub starsUsed in 5 repos~1.2k tokens
    DatabasesAuto-check passed

More from cartography-cncf/cartography

All 11 skills in this repo
  • Add Node Type

    cartography-cncf/cartography

    Define a new node schema under cartography/models/MODULENAME/, including required properties, sub-resource relationships, extra labels, conditional labels, scoped cleanup, and one-to-many transforms.

    4.1k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Add Relationship

    cartography-cncf/cartography

    Define a CartographyRelSchema (standard relationship), one-to-many edge, or MatchLink connecting existing nodes.

    4.1k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Analysis Jobs

    cartography-cncf/cartography

    Add a post-ingestion typed analysis job to a Cartography module to enrich the graph after sync.

    4.1k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Create Module

    cartography-cncf/cartography

    Author a new Cartography intel module end-to-end (entry point, sync GET/TRANSFORM/LOAD/CLEANUP, declarative data model, integration test, schema docs).

    4.1k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Create Rule

    cartography-cncf/cartography

    Author a Cartography security rule (one or more Cypher Facts plus a Pydantic Finding output model) under cartography/rules/data/rules/.

    4.1k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Enrich Ontology

    cartography-cncf/cartography

    Map a Cartography node into the Ontology system using semantic labels (UserAccount, DeviceInstance, Tenant, Database, ObjectStorage, FileStorage) or canonical nodes (User, Device).

    4.1k GitHub stars~2.4k tokensUpdated today
    Auto-check passed

Categories

Questions about Troubleshooting

What does Troubleshooting do?

Diagnose and fix common Cartography intel-module errors — ModuleNotFoundError, PropertyRef validation failed, GraphJob failed, missing relationships, MatchLink misses, cleanup deleting too much…. Troubleshooting is an agent skill from cartography-cncf/cartography. Diagnose and fix common Cartography intel-module errors — ModuleNotFoundError, PropertyRef validation failed, GraphJob failed, missing relationships, MatchLink misses, cleanup deleting too much, slow queries, ignored custom schema fields, key errors during transform.

When should I use Troubleshooting?

Troubleshooting fits situations like: the user reports an error while developing; running a Cartography module.

How do I install Troubleshooting in Claude Code?

Run `npx skills add cartography-cncf/cartography --skill troubleshooting -a claude-code`. Or copy the skill folder (.agents/skills/troubleshooting in cartography-cncf/cartography) into .claude/skills/troubleshooting in your project. Claude Code loads it when a task matches its description.

How do I install Troubleshooting in Codex?

Run `npx skills add cartography-cncf/cartography --skill troubleshooting -a codex`. Or copy the skill folder (.agents/skills/troubleshooting in cartography-cncf/cartography) into .agents/skills/troubleshooting in your project. Codex loads it when a task matches its description.

Can I use Troubleshooting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cartography-cncf/cartography --skill troubleshooting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/troubleshooting, .gemini/skills/troubleshooting, .github/skills/troubleshooting and .opencode/skills/troubleshooting in your project.

What does Troubleshooting need to run?

Going by SKILL.md and its folder, Troubleshooting needs the command-line tools its instructions call (node). Our summary lists: Python 3.

Does Troubleshooting access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Troubleshooting safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Troubleshooting use?

Troubleshooting is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Troubleshooting use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Troubleshooting?

Skills that share tags, products or a category with Troubleshooting: SQL Optimization Patterns (ynulihao/AgentSkillOS, 617 stars), Cloud Trace Querying (google/skills, 21k stars), Query Engine Design (revfactory/claude-code-harness, 120 stars) and Query Plan Snapshot CLI (eclipse-rdf4j/rdf4j, 420 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Troubleshooting?

cartography-cncf (a GitHub organization) maintains it in cartography-cncf/cartography, which has 4,128 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 9, 2026.

Source: cartography-cncf/cartography on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.