Skip to content
Back to skills

Map People

BSecurity

Links to Duccio (the second brain) the people who work on the projects, drawing them from the git authors of the repos linked to the hubs and from the project documents, and creates or updates the notes in the people folder and the people field of the hubs. Use after map-repos, or when the user asks to map, link or update the people of the projects.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
developmentpythongobashangularnodeterraformgitapifrontenddocumentation

Works with

  • cli
  • api

Security analysis

B88/100
  • criticalSends environment variables or credentials to an external URL

Pro shows the line behind each finding and how to fix it

Scanned December 1, 2026

npx -y skills add gabrycaos/duccio --skill map-people --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Map People?

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

Security grade badge for Map People
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrycaos-map-people/badge)](https://www.skillsdirectory.com/skills/gabrycaos-map-people)

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

Download with Pro
SKILL.md
---
name: map-people
description: Links to Duccio (the second brain) the people who work on the projects, drawing them from the git authors of the repos linked to the hubs and from the project documents, and creates or updates the notes in the people folder and the people field of the hubs. Use after map-repos, or when the user asks to map, link or update the people of the projects.
---

# map-people

Work from the repo root. Apply the "Writing rules" and "Git protocol" sections of `AGENTS.md`. Folder names and headings below are the English ones; in a vault of another language use the matching names from the table in "Vault language". The projects folder (set in `config/local.yaml`) is read-only.

Work only on the paths already linked to the hubs (`repos`): if no hub has any, suggest `map-repos` and stop.

If `.venv/bin/python scripts/sbconfig.py workspace` fails (projects folder not configured or missing on this machine), tell the user with its message and continue without the repos: skip the git authors in step 2 and the document search in the repos in step 4.

## 1. Pull

Pull according to the Git protocol.

## 2. Git authors

The script reads:
- the hubs and their `repos`;
- the domain → client map (the `domains` key of the client notes);
- the notes in `People/`;
- `config/people-ignore.txt`.

Then it reads the git authors of the linked repos, on all branches, in the `SINCE` window. Optional variables, to pass on the same line as the command:
- `SINCE` (default `12.months`): widen it only if the user asks, e.g. `SINCE=3.years`;
- `EXTRA_DOMAINS`: domains confirmed in step 3 and not yet written in the notes, `domain=Client` separated by commas, e.g. `example.com=Example,acme.com=Acme`;
- `DOC_PEOPLE`: people found in step 4, separated by `;`, each as `Name=Hub1,Hub2` (the hubs of the paths where they appear), e.g. `Mario Rossi=Portale B2B;? Bianchi=App Mobile`.

```bash
EXTRA_DOMAINS="" DOC_PEOPLE="" .venv/bin/python - <<'EOF'
import fnmatch, glob, os, re, subprocess, sys, unicodedata
from collections import Counter, defaultdict
from pathlib import Path

sys.path.insert(0, "scripts")
import sbconfig
import yaml

# configuration: vault language (folder names) and projects folder
try:
    code = sbconfig.language()
    if code is None:
        sys.exit("vault language not configured: run scripts/setup.sh")
    FOLDERS = sbconfig.vocabulary(code).folders
    WS = sbconfig.workspace()
except sbconfig.ConfigError as exc:
    sys.exit(str(exc))
if WS is None or not WS.is_dir():
    print("projects folder unavailable: skipping git authors and repo documents")
    WS = None
CLIENTS, PROJECTS, PEOPLE = FOLDERS["clients"], FOLDERS["projects"], FOLDERS["people"]

SINCE = os.environ.get("SINCE") or "12.months"
EXTRA = dict(x.split("=", 1) for x in os.environ.get("EXTRA_DOMAINS", "").split(",") if "=" in x)
DOC_PEOPLE = [x.strip() for x in os.environ.get("DOC_PEOPLE", "").split(";") if x.strip()]
SKIP_DOMAINS = ("gmail.com", "googlemail.com", "yahoo.*", "outlook.*", "hotmail.*", "live.*", "msn.com",
                "icloud.com", "me.com", "mac.com", "proton.me", "protonmail.*", "libero.it", "virgilio.it",
                "tiscali.it", "alice.it", "users.noreply.github.com", "*.noreply.github.com",
                "localhost", "*.local", "*.localdomain", "*.internal", "*.lan",
                "example.com", "example.org", "example.net", "*.example")


def meta(path):
    text = Path(path).read_text(encoding="utf-8")
    if not text.startswith("---\n"):
        return {}
    return yaml.safe_load(text[4:text.find("\n---", 3)]) or {}


def norm(name):
    ascii_name = unicodedata.normalize("NFKD", name).encode("ascii", "ignore").decode().lower()
    return " ".join(sorted(re.findall(r"[a-z0-9]+(?:'[a-z0-9]+)*", ascii_name)))


ignore = [line.strip().lower() for line in Path("config/people-ignore.txt").read_text(encoding="utf-8").splitlines()
          if line.strip() and not line.strip().startswith("#")]


def ignored(*values):
    return any(fnmatch.fnmatchcase(v, p) for v in values if v for p in ignore)


domain_client = {}
for path in glob.glob(f"vault/{CLIENTS}/*/*.md"):
    m = meta(path)
    if m.get("type") == "client":
        for d in m.get("domains") or []:
            domain_client[str(d).lower()] = Path(path).stem
domain_client.update({k.strip().lower(): v.strip() for k, v in EXTRA.items()})


def client_of(domain):
    parts = domain.split(".")
    for i in range(len(parts) - 1):
        if ".".join(parts[i:]) in domain_client:
            return domain_client[".".join(parts[i:])]
    return None


existing = {}
for path in glob.glob(f"vault/{PEOPLE}/*.md"):
    m = meta(path)
    stem = Path(path).stem
    existing[norm(stem)] = stem
    for alias in m.get("aliases") or []:
        existing[norm(str(alias))] = stem
    if m.get("email"):
        existing[str(m["email"]).lower()] = stem

repo_hubs = defaultdict(set)
for path in glob.glob(f"vault/{CLIENTS}/*/{PROJECTS}/*/*.md"):
    m = meta(path)
    if m.get("type") == "project":
        for repo in m.get("repos") or []:
            repo_hubs[repo].add(Path(path).stem)

by_email, unknown, skipped = {}, defaultdict(set), set()
for repo, hubs in sorted(repo_hubs.items()):
    if WS is None or not (WS / repo / ".git").exists():
        continue
    log = subprocess.run(["git", "-C", str(WS / repo), "log", "--all", f"--since={SINCE}",
                          "--format=%aN|%aE|%cd", "--date=short"], capture_output=True, text=True).stdout
    for line in log.splitlines():
        name, email, date = line.rsplit("|", 2)
        email = email.strip().lower()
        domain = email.rpartition("@")[2]
        if ignored(email, norm(name)):
            continue
        if "." not in domain or any(fnmatch.fnmatchcase(domain, p) for p in SKIP_DOMAINS):
            skipped.add(email)
            continue
        client = client_of(domain)
        if client is None:
            unknown[domain].add(name)
            continue
        p = by_email.setdefault(email, {"names": Counter(), "hubs": set(), "commits": 0, "last": "", "client": client})
        p["names"][name] += 1
        p["hubs"] |= hubs
        p["commits"] += 1
        p["last"] = max(p["last"], date)


def full_name(names, email):
    full = [n for n in names if len(n.split()) >= 2]
    if full:
        return max(full, key=lambda n: (not n.islower() and not n.isupper(), names[n]))
    local = email.partition("@")[0]
    if re.fullmatch(r"[a-z]+(\.[a-z]+)+", local):
        return " ".join(w.capitalize() for w in local.split("."))
    return "?"


people = {}
for email, p in by_email.items():
    name = full_name(p["names"], email)
    key = norm(name) if name != "?" else email
    if name != "?" and ignored(key):
        continue
    q = people.setdefault(key, {"name": name, "emails": {}, "aliases": set(), "hubs": set(), "commits": 0,
                                "last": "", "client": p["client"], "source": "git"})
    q["emails"][email] = p["last"]
    q["aliases"] |= {n for n in p["names"] if len(n.split()) >= 2 and n.lower() != name.lower()}
    q["hubs"] |= p["hubs"]
    q["commits"] += p["commits"]
    q["last"] = max(q["last"], p["last"])
for entry in DOC_PEOPLE:
    name, _, doc_hubs = entry.partition("=")
    name, doc_hubs = name.strip(), {h.strip() for h in doc_hubs.split(",") if h.strip()}
    key = norm(name)
    if ignored(key):
        continue
    if key in people:
        people[key]["source"] = "git+doc"
        people[key]["hubs"] |= doc_hubs
    else:
        people[key] = {"name": name, "emails": {}, "aliases": set(), "hubs": doc_hubs, "commits": 0,
                       "last": "", "client": "", "source": "doc"}

print("== user ==")
print(subprocess.run(["git", "config", "user.email"], capture_output=True, text=True).stdout.strip())
print("== unknown domains: domain, authors, examples ==")
for domain, names in sorted(unknown.items(), key=lambda kv: (-len(kv[1]), kv[0])):
    print(f"{domain}\t{len(names)}\t{', '.join(sorted(names)[:3])}")
print(f"== authors discarded for public or fictitious domain: {len(skipped)} ==")
print("== candidates: name, email, other emails, aliases, company, projects, commits, last commit, source, existing note ==")
for key, q in sorted(people.items(), key=lambda kv: norm(kv[1]["name"])):
    emails = sorted(q["emails"], key=q["emails"].get, reverse=True)
    note = existing.get(key) or next((existing[e] for e in emails if e in existing), "")
    print("\t".join([q["name"], emails[0] if emails else "", ", ".join(emails[1:]), ", ".join(sorted(q["aliases"])),
                     q["client"], ", ".join(sorted(q["hubs"])), str(q["commits"]), q["last"], q["source"], note]))
EOF
```

The output has four sections:
- the user's email;
- the unknown domains, with the number of authors and a few example names;
- how many authors were discarded because they had a public or fictitious domain;
- the candidates, one row per person: name, most recent email, other emails, aliases, company, projects, number of commits, last commit, source (`git`, `doc`, `git+doc`), existing note in `People/`.

People with an unknown domain do not appear among the candidates until the domain is assigned to a client in step 3.

## 3. Unknown domains

If the section is empty, skip to step 4. Otherwise show the user the domains and for each one ask:
- **client**: which client it belongs to, existing or new; the user can choose to save the parent domain;
- **ignore**: for upstream contributors of forks, bots, third-party companies. Propose a bulk answer when many domains are clearly of this kind.

The user's company is recognized by the domain of their email (first section). If it has no client note, propose creating it (e.g. `Clients/Example/Example.md` for `example.com`). People from suppliers or partners that are not clients do not come in from here: they are added with `capture` or `process`.

Note the answers: you write them in step 7.

## 4. People from documents

For each path in the hubs list the documents that describe the project:

```bash
WS="$(.venv/bin/python scripts/sbconfig.py workspace)" || exit 1
P="<path>"
DOCS='(^|/)(readme|project_state|project_map|state|team|contributors|codeowners|stakeholder|persone|people|contatti|contacts)[^/]*$|(^|/)(adr|decisions|sessions|meetings|riunioni|verbali)/|riunion|meeting|verbal|minutes'
if [ -e "$WS/$P/.git" ]; then
  git -c core.quotePath=false -C "$WS/$P" ls-files | /usr/bin/grep -i -E '\.(md|rst|txt|adoc)$' \
    | /usr/bin/grep -v -E '(^|/)\.' | /usr/bin/grep -i -E "$DOCS"
else
  /usr/bin/find "$WS/$P" \( -name node_modules -o -name bower_components -o -name vendor \
    -o -name .venv -o -name venv -o -name __pycache__ -o -name .tox -o -name target \
    -o -name build -o -name dist -o -name .gradle -o -name .m2 -o -name .next -o -name .nuxt \
    -o -name .angular -o -name .svelte-kit -o -name coverage -o -name .terraform \
    -o -name Pods -o -name .cache -o -name .obsidian \) -prune \
    -o -type f \( -name '*.md' -o -name '*.txt' -o -name '*.rst' \) -print | sed "s|^$WS/$P/||"
fi
```

Read in full the README, the status and map documents, and the team or stakeholder files. If there are many ADRs, sessions or meeting minutes (more than ~20 files), do not read them all. First find the ones that name people:

```bash
WS="$(.venv/bin/python scripts/sbconfig.py workspace)" || exit 1
P="<path>"
TERMS='partecipant|participant|attendee|presenti|stakeholder|referent|decisor|decision.maker'
if [ -e "$WS/$P/.git" ]; then
  git -C "$WS/$P" grep -l -I -i -E "$TERMS" -- '*.md' '*.rst' '*.txt' '*.adoc' | /usr/bin/grep -v -E '(^|/)\.'
else
  /usr/bin/find "$WS/$P" \( -name node_modules -o -name bower_components -o -name vendor \
    -o -name .venv -o -name venv -o -name __pycache__ -o -name .tox -o -name target \
    -o -name build -o -name dist -o -name .gradle -o -name .m2 -o -name .next -o -name .nuxt \
    -o -name .angular -o -name .svelte-kit -o -name coverage -o -name .terraform \
    -o -name Pods -o -name .cache -o -name .obsidian \) -prune \
    -o -type f \( -name '*.md' -o -name '*.txt' -o -name '*.rst' \) -print0 \
    | xargs -0 /usr/bin/grep -l -I -i -E "$TERMS" | sed "s|^$WS/$P/||"
fi
```

Then read only the relevant passages of those files. In forks ignore the upstream documents (e.g. the OpenStack documentation).

Extract the people with a role or a relationship with the project, not passing mentions. For each one note:
- full name, or `? Surname` if the first name is missing or `Name ?` if the surname is missing;
- role;
- company;
- the hub of the path where they appear;
- the document it comes from.

Then rerun the script of step 2. To avoid copying it again, extract it into a temporary file:

```bash
awk '/^EXTRA_DOMAINS="" DOC_PEOPLE="" .venv\/bin\/python - <<.EOF.$/{f=1;next} /^EOF$/{f=0} f' \
  .agents/skills/map-people/SKILL.md > "${TMPDIR:-/tmp}/map_people.py"
EXTRA_DOMAINS="<domain=Client,…>" DOC_PEOPLE="<Name=Hub,…;…>" .venv/bin/python "${TMPDIR:-/tmp}/map_people.py"
```

Values:
- `EXTRA_DOMAINS`: the domains assigned to a client in step 3;
- `DOC_PEOPLE`: the people found here, with their hubs.

The script merges the sources by normalized name, discards whoever is in `people-ignore.txt` and flags existing notes. The unknown-domains section again lists the ones you decided to ignore in step 3, because the file is only written in step 7: skip them.

## 5. Propose

Show a numbered table with these columns:
`# | name | email | company | proposed role | projects | source | new/existing`
- **source**: `N commits, last on YYYY-MM-DD` and/or the path of the document.
- **proposed role**: the one from the documents. For those who come only from git, propose one only if it is evident from the commits (e.g. "frontend developer"); otherwise leave `?` and ask.
- **company**: for those with an email, the client of their domain. For those who come only from documents, the company stated there: wikilink if it has a client note, otherwise text.
- **conflicts**: if the sources give different companies or roles for the same person, put them in a "to clarify" group and ask.
- **name**: rows with `?` must be completed by the user or skipped. A skipped row does not go into `people-ignore.txt`: it will be proposed again on the next run. If the user completes or corrects a name, check again that it does not already exist in `People/` (file name and `aliases`) before writing.

For each row the user can confirm, correct or ignore. Proceed only with the confirmed or corrected rows.

## 6. Before writing

For each existing note you are about to touch (hubs, client notes, people) apply the "Notes with uncommitted changes" rule of `AGENTS.md`.

## 7. Write

- **New client** (step 3): `vault/Clients/<C>/<C>.md` from `vault/Templates/client.md`, with `status: active`, `domains` and a line in `## Log`.
- **Existing client with new domains**: add them to `domains` and add a Log line, e.g. `- <today> — added the email domain `acme.it` (map-people)`.
- **New person**: `vault/People/<First Last>.md` from `vault/Templates/person.md`, with:
  - `role`;
  - `company`: wikilink in quotes to the client (`"[[Acme]]"`) or text;
  - `email`: only one, the most recent;
  - `aliases`: the name variants from the aliases column, plus any corrections by the user;
  - `## About`: one or two lines on the role, without listing the projects (they emerge from the backlinks).
- **Existing person**: fill in only the empty fields and add the new variants to `aliases`. To change a value that is already there, ask for confirmation.
- **Hub**: add `"[[First Last]]"` to the `people:` list of every project in the row, without duplicates and keeping the inline format (`people: ["[[A]]", "[[B]]"]`). Add at the top of `## Log` a line `- <today> — linked the people [[A]], [[B]] (map-people)`.
- **Ignored domains**: add `*@<domain>` and `*@*.<domain>` to `config/people-ignore.txt`.
- **Ignored people**: add to `config/people-ignore.txt` all their emails and the normalized name (lowercase, no accents, words in alphabetical order: `Mario Rossì` → `mario rossi`). Never write a name with `?`.

Then run `.venv/bin/python scripts/lint.py` and fix the errors in your notes.

## 8. Commit and push

Stage only the touched files (person notes, hubs, client notes, `config/people-ignore.txt` if modified). Commit with `git commit -m "map-people: <summary>"`, then push according to the Git protocol.

Summary:
- people created and updated;
- hubs and clients updated;
- domains assigned and ignored;
- people ignored;
- authors discarded for public domain;
- pending push.

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.

View all in development →

Comments

Loading comments…

Newsletter

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