/credit-monitoring:monitor-setupfrom Credit Monitoring
Configures credit monitoring for a borrower by writing two control files: borrower-config.json (paths, budget, module menu) and deal-context.json (thesis, risks, current view). Run once per borrower or to update paths/modules/deal view.
Ships in Credit Monitoring. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read ../../CLAUDE.md before anything else; it holds the rules shared by every skill.
Produce the two per-borrower control files every other stage reads: borrower-config.json (mechanical)
and deal-context.json (interpretive). Both are DATA and live in the analyst-CONNECTED output folder —
never inside the plugin, never inside the read-only reporting/deal folder. Templates are in config/.
When this skill is directly invoked by the analyst and run-monitor has not handed it resolved entry
context, first follow ../../references/entry-routing.md through its welcome and
permission menu. Preserve explicit setup intent. When run-monitor already supplied that context,
continue here without repeating the welcome or permission menu.
Before the first question, find what this session can reach through
../../references/runtime/cowork/files.md. If either source or store root is unavailable,
follow store-setup to obtain both folders.
Keep both connected roots in context and bind them on every plugin subprocess and worker brief; one
subprocess cannot export them to the next. Every later choice runs the same loop — look first, propose
what you found as options with the one you recommend leading, then act on the option the analyst picks
through AskUserQuestion (../../references/asking.md). Anything mechanical you can
see, just do.
Run this skill in the session that talks to the analyst. Every ASK here — the output folder, each
input path, the module menu, the Part B judgment fields — is a menu the analyst answers. A subagent
cannot ask, so a delegated setup writes control files with those answers blank and nobody notices until
the memo is missing the analyst's view. Setup itself runs here start to finish — the plugin's three
workers (agents/) belong to covenant-setup, build-monitoring-model and monthly-monitor, and setup
adds none of its own. Reading a budget tab or a deal document to fill a field is a few tool calls in
this session, not a dispatch.
When a folder is missing, name it in one line and ask with a menu, offering [Open the folder guide] by following open-folder-guide. It is a help document for the analyst and never starts setup or waits on the output folder. When every folder is there, say nothing about folders and get on with setup.
config/borrower-config.template.json
and config/deal-context.template.json.borrower-config.json and deal-context.json, both validated.Writing a control file: start from the template, fill it, and write it with the Write tool — the
file's content IS JSON, so true / false / null are written as JSON. Reach for python only when the
values come from a file you just parsed, and then build a dict and json.dump it rather than pasting
JSON text into a script (JSON literals are not Python literals — that is what turns a config write into
a syntax error). Either way, json.load the file back from its final path afterwards: a write nobody
read back is not a saved file.
Keep the OBJECTIVE layer and the INTERPRETIVE layer separate. Paths, the pinned budget, covenant math, variances and aging govern. Deal context only changes how the memo is prioritized and read — it never alters a computed figure.
Updating an existing borrower — check and fix, don't re-interview. Read the existing
borrower-config.json and fill only what's missing or stale; step 8's check names the stale paths. If model_output_path still points into
.record/current, ask before changing it; verify the existing workbook and sidecars, copy them into
<borrower root>/_model/, verify the copies, then update the path. Leave historical runs and every
analyst setting unchanged.
The source may contain one or multiple companies. After the source folder is approved, list only its visible top level and collect every apparent company-folder candidate. Do not assume the source folder itself is the company. Sort candidates once in case insensitive order by displayed folder name. Do not recommend a company: folder order is not credit evidence.
AskUserQuestion allows at most four choices, so use this bounded menu:
../../references/asking.md. The Other box may
also supply a company name at any page. Not now pauses without selecting a company.A group or subsidiary name does not automatically define a separate borrower, so confirm the intended scope when that is ambiguous. If the top level has no apparent candidates or is mixed and unclear, ask the same normal free text company-name question.
Do not recursively search other company folders, inspect every borrower, or mix documents across borrowers. An already named borrower skips this question and every candidate menu. The selected company scope only limits what you inspect next; it does not select or bind any input path. Every saved input still follows A1's analyst-selected path rules.
Every borrower's work is saved in its own folder inside the monitoring folder (store). Do the
looking first: find the attached store folder, list what is already in it and
offer the borrower's own subfolder — the one that matches, or a new one named after the borrower —
ALWAYS plus [Point me to a different folder]. Proposing what you can see is not defaulting; the
analyst still picks. Until the folder is reachable, write nothing; never fall back to a temp or session
folder.
Every WRITABLE artifact lives UNDER that borrower folder. The stable builder workspace is
<borrower root>/_model/; lifecycle state and control files live under <borrower root>/.record/.
Nothing writable goes into the connected source/deal folder.
Each input path is analyst-SELECTED, never auto-detected or reused from another deal — guessing sends setup hunting through the wrong folders.
source:Example Borrower/1_Borrower Information/2_Financials/Management Accounts, or
store:borrowers/example/.record/current/config/covenant-spec.json. There are two shared folders:
source is the deal
documents folder (3_Current Portfolio) and store is the monitoring folder. That string works
for whoever has the folder connected, however they connected it; the full path you are reading
the file at works only here. When a file sits in neither shared folder, say so plainly in the
analyst's words and ask them to put it in one.reporting_packages_folder: ask the analyst to connect the deal's reporting folder. Offer it as a
menu of the likely reporting subfolders you can see, ALWAYS plus "point me to it" — never a fixed
two-option list. ONLY after it's connected, detect the latest month WITHIN that chosen folder and
confirm it; ask about any gaps.
1a. compliance_certificate_folder (optional): ask where this deal files its certificates. Offer likely
certificate subfolders you can see, ALWAYS plus [Use the reporting folder] and [Point me to it].
Keep the value blank when they choose the reporting folder; covenant compliance searches a configured
folder first and falls back to reporting packages when the period's certificate is not there.credit_agreement_path AND ic_uw_memo_path: ask the analyst to select each file. The credit
agreement is OUTSIDE the reporting folder, elsewhere in the borrower's deal folder. Look through
that folder yourself and offer the files that look right as a menu, ALWAYS plus [Point me at
it] / [Skip — I don't have it now]. The file's own subfolder varies by deal. Cite the file
by its path in the source folder even when its name says nothing, such as 1.pdf; never copy it
into the store under a better name. On skip,
leave blank and warn plainly: no credit agreement → covenant-setup is blocked; no final/executed IC
or UW memo → business_profile, credit_thesis and key_risks_at_uw come through as flagged drafts.budget_path: ask the analyst to select the budget workbook (same menu) and confirm which tab/version
IS the approved budget (budget_version_note).model_output_path at store:borrowers/<borrower key>/_model/<actual workbook>.xlsx.
Point monitor_output_folder at store:borrowers/<borrower key>/.record/current. Keep
covenant_spec_path, debt_service_spec_path, debt_service_schedule_path, deal_context_path,
budget_map_path and collateral_map_path under .record/current/config/. The model builder's
source map, restatements, profile, and dated snapshots live beside the canonical workbook in
_model/; completed runs snapshot the required files.
4a. MAP the borrower's own statement row labels — model_lines, analysis_lines, opex_groups.
Open the borrower's income statement and balance sheet and read the labels off them, then write each
canonical key to the label THIS borrower uses: model_lines (cash, accounts_receivable,
accounts_payable, inventory, revenue, operating_cogs, ebitda_bridge, total_debt and the rest),
analysis_lines, and each opex_groups entry. Charts of accounts differ per deal — one borrower's
cash row reads Total - 1000 - Cash, another's Cash and cash equivalents. Confirm the mapping with
the analyst before finishing, since every downstream figure is read through it. Leaving these at the
template's values points three modules at the wrong rows, or at rows that do not exist: the template
ships one borrower's labels as an illustration, not a default.4b. BUILD budget-map.json — this skill produces it, not just the path. Open the pinned budget
workbook (budget_path + the tab from budget_version_note) and fill in
config/budget-map.template.json: sheet, period_columns (EVERY month the budget covers that the
monitor may report on — a missing month makes budget-vs-actual fail that month), metric_rows
(revenue; gross_profit if the plan has one; for EBITDA exactly ONE of 'ebitda', the plan's own
EBITDA row, when the plan stops at EBITDA, or the rows that build it: net_income,
interest_expense, taxes, depreciation_amortization, plus financing_cost / interest_income only if
the plan has them. A map naming both is refused), opex_groups (the {add, subtract}
shape reconciles a budget whose chart of accounts differs from the actuals'; leave the block out
when the plan has no opex line), and — when the pinned
budget carries a balance-sheet section — balance_sheet_rows for the collateral components it plans,
so the memo's Collateral box can show 'vs Budget'. Two key joins: opex_groups keys match
borrower-config opex_groups EXACTLY, and balance_sheet_rows keys match collateral-map
pledged_components labels EXACTLY.
Map only lines the plan has: leave out a line it does not have, and never fill a line from another
row or a blank row. The engine reads a missing line as no plan and says so; a borrowed or blank row
reads as a plan figure, so EBITDA standing in for gross profit becomes a false beat, and a blank row
becomes a $0 plan.
VERIFY before accepting: extract one known month through the map and eyeball revenue, gross profit,
EBITDA, each opex group and any balance_sheet_rows against the budget tab; fix the map until they
match.
4c. BUILD collateral-map.json — this skill produces it too. From the credit agreement's
security/collateral provisions, fill in config/collateral-map.template.json: lien type, the pledged
asset categories each mapped to its model balance-sheet row, the coverage cuts, and the funded-debt
denominator. Liabilities are never collateral; include inventory only if the borrower has it. Write
it to collateral_map_path; the report's Collateral metrics box reads it. This needs covenant-setup's
parse of those security provisions first; on a standalone run, run covenant-setup first.
5. Set modules[] — the analysis modules to run for THIS deal (covenant-compliance, budget-vs-actual,
ap-ar-aging, three-statement-analysis, revenue-quality, …). Modules are OPT-IN and INPUT-GATED: a
module runs only if it is listed AND its inputs exist; otherwise the monitor omits that section and
flags it. This is how deals without AP/AR aging — or with extra inputs like a borrowing-base cert —
are handled.
5a. READ THE MODEL'S UNIT OFF THE WORKBOOK — model.scale, model.currency. Required: every
module reads it, and a borrower that has not declared it gets a run where every module skips and says
so. Open the borrower's income statement and look at the top of the columns: a caption reading
"$ in thousands", "USD 000s" or "$'000" means scale: 1000; whole dollars mean scale: 1. Paste the
caption's own wording into unit_verbatim — it is the evidence for the number. Set currency to the
ledger's currency. Models commonly report in thousands, so this is not an edge case: left wrong, a
$1,000,000 covenant floor is compared against a figure of 2,200 and the run publishes a
breach on a compliant borrower.
SANITY-CHECK IT with the analyst rather than only reading the caption: name one figure both ways —
"revenue for the latest month reads 9,750 in the workbook, so $9,750,000 — is that right for this
borrower?" A caption is often missing, and a scale nobody checked is the whole problem this field
exists to remove.
THEN, IF scale IS NOT 1, SET aging.amount_scale TOO. It is the same question asked of a different
file: an A/R or A/P aging export comes off the ledger in whatever unit the ledger prints, usually raw
dollars, while the model is in thousands. Open the export and compare its total against the balance
sheet's receivables for that month — a factor of a thousand apart means amount_scale: 1000, the same
figure means 1. ap-ar-aging refuses to run without it once the model is not in dollars, because the
file cannot say which it is.
6. Decide the LINE-READ MATERIALITY FLOOR (analysis.line_read.materiality_floor) — how big a move
has to be before the memo mentions it. RECOMMENDED: leave null, so it scales with the borrower's own
revenue; pin a figure only when the analyst wants a different bar for THIS credit.
Ask it in dollars, never by the name of the setting. Work out what the derived floor comes to
first (read it back from floor_basis, which states it in dollars), then put THAT to the analyst:
"I'll flag anything that moves more than about [derived dollar floor] — that's sized off this
borrower's revenue and moves with it. Want a different number?" Options are the derived figure (recommended), a
round figure above it, and a round figure below it. A label like "engine default" describes our
internals and leaves the analyst nothing to decide on; a dollar figure they can judge in
a second. Same rule for every other setting on this page — say what it does to their memo, in their
units, never what we call it.
7. Write borrower-config.json INTO the connected output folder. Verify every WRITABLE path resolves
INSIDE that output folder and that NO writable path resolves inside the reporting/deal folder.
8. CHECK the finished config before you finish. Run
python ${CLAUDE_PLUGIN_ROOT}/skills/monitor-setup/references/config_paths.py check "<this borrower-config.json>".
It exits 1 and lists each path that cannot stay, with its reason. A value that starts with a drive
letter, /sessions/, /home/ or /Users/ names one computer and works only where it was written:
rewrite it through step A1.0. An input from A1 that starts with store: belongs in the source
folder: point it at the original file there through A1. Run the check again until it passes.
9. Register the borrower in the registry. python ${CLAUDE_PLUGIN_ROOT}/lib/fleet.py register --config "<this borrower-config.json>" adds/updates this borrower in credit-monitoring-registry.json at the monitoring
root — so run-monitor resolves it in ONE lookup next time.
AUTO-DRAFT the factual static block from the borrower's OWN documents (borrower-agnostic sources):
facility economics ← executed loan docs (promissory note, loan/credit agreement, fee letter,
disbursement letter): commitment, funded, draw type, rate (index + margin, cash/PIK), OID, fees,
warrant/equity kicker, security, maturity. Cite the document each figure came from.
The FEE LETTER is MANDATORY reading when present — fee letters routinely carry ADDITIVE
economics on top of the agreement (extra PIK to the agent, extra success/exit fees) that are not
conflicts but layers; sourcing fee economics from an IC/UW memo instead of the executed fee letter
can omit additive agent PIK or success fees. Check the executed fee letter rather than inferring terms.
DISCREPANCY RULE — exhaust executed docs before flagging. When any two sources state different
terms or economics (memo vs agreement, cert vs model, any pair), text-sweep EVERY executed
document in the deal folder for the conflicting term (pdftotext + grep takes minutes) BEFORE
recording a discrepancy flag. A flag is for a genuinely unresolvable conflict, not an unread file —
and the resolution is often a LAYERING structure in which both sources are right.
business_one_liner / vertical ← the IC / UW memo (paths.ic_uw_memo_path).
business_profile ← the same IC / UW memo, every field of the template's block filled: what the
company actually does, revenue model and channel mix, end markets, customer and supplier
concentration, geography, seasonality, competitive position, ownership, management, headcount,
history, the operating KPIs that drive the P&L, working-capital profile. Cite the source for each
claim and stamp its source_tier — and pick the tier honestly: concentration %, headcount and
channel mix in a memo are usually management-prepared (the memo repeating borrower/CIM claims),
not internal-underwriting. Where the memo is silent, leave that field a flagged draft rather than
inventing it. This is the business context monthly-monitor reads to DIAGNOSE the financials — it is
not restated in the memo each month.
If ic_uw_memo_path is blank, check the credit_agreement_path folder root — executed/final docs
are saved together — and confirm; still not found, leave the block a flagged draft rather than
falling back to the borrower's CIM / marketing deck.
credit_thesis pillars + key_risks_at_uw ← the same IC / UW memo. Capture the thesis the
deal was actually APPROVED on and the risks named there; map each thesis pillar to a monthly metric
that tests it. No UW/IC memo found → leave the fields as flagged drafts for the analyst, never an
invented thesis.
1b. PROPOSE the deal ARCHETYPE (static.archetype) — infer it from the IC/UW memo's business
description (controlled vocabulary + framing blocks: ../monthly-monitor/references/archetypes.md) and
put it to the analyst as a confirm-or-override alongside the judgment fields below. Analyst skips →
write the inferred value with archetype_provenance "inferred — unconfirmed"; nothing fits →
"unclassified" (generic framing; never blocks onboarding). The archetype selects the memo's liquidity
framing, KPI emphasis and collateral read; it never changes a computed figure.
1c. PROPOSE the DEAL TEAM (static.deal_team), then have the analyst CONFIRM it — these are the
names the memo header shows, in display order. The deal team belongs to the lender,
not the borrower. Documents may name either party. Use other authorized deal records
as supporting evidence, but have the analyst confirm membership:
python ${CLAUDE_PLUGIN_ROOT}/references/deal_team.py propose
--exclude "<this borrower's folder>" --name "" --name ""
Candidates are the names the IC/UW memo's deal-team page gives, plus any the analyst mentions.
The engine returns propose (the same person is named on another credit deal — evidence attached),
and ask_about for the rest: officer (carries an officer title — the borrower's own officer),
near (one small edit from a name on the book, so likely that name misspelled), unknown
(nobody on the book). It also returns others_on_the_book, the colleagues who appear on the
most deals, so adding a missing name is one pick.
PUT the proposal to the analyst as one AskUserQuestion confirm-or-edit, each name beside its
evidence and every ask_about name unchecked. Write only what the analyst confirms, and stamp
static.deal_team_provenance "analyst-confirmed YYYY-MM-DD".
The analyst skips → leave the list empty and the stamp blank, and the memo simply omits its
deal-team line — an empty list is a valid answer, never a blocker.
ASK THE ANALYST only the judgment fields (our_view), each as a menu: watchlist
on/off, trajectory (improving / stable / deteriorating), one-line thesis status, and "what would
change our mind" (the free-text box). ASK THE ONE-LINE THESIS STATUS LAST, after step 3, with the
pillars and the statuses just given listed above it — that line summarises the pillars, so it
cannot be written before they are graded. Surface the latest objective evidence (current covenant
status, key variances, aging) to make the call fast — then leave the choice unrecommended. This is
the credit judgment, the one place the monitor lays out the evidence and does not lead with an
option (../../references/asking.md).
Ask these HERE, in the session with the analyst; every one of them is theirs to give, and a
blank our_view is what makes a first memo read like it has no house view. In a synthetic test,
pinned test-persona judgments supplied by the test instructions stand in for analyst answers; they
are not document facts, must not be inferred from the fixture, and must be recorded as supplied
analyst judgments. Before finishing, read
the file back and confirm each field carries the analyst's answer.
SET credit_thesis[].status (intact / pressured / broken) WITH the analyst, ONE PILLAR AT A TIME.
FIRST READ THE DRAFTED PILLARS BACK — every one, in the memo's own words, each beside the monthly
metric that tests it — and let the analyst correct or drop any before grading starts. A pillar the
analyst has not read gets no status.
THEN one question per pillar, and that pillar's own words go in the QUESTION TEXT with the period's
evidence for it beneath them: "When we lent, the bet was ‹pillar, quoted›. ‹What the figures say
about it.› Where does that stand now?" A five-word option label cannot carry a pillar, so intact /
pressured / broken on their own ask the analyst to grade a bet they cannot see.
Whether a pillar is pressured is credit judgment like step 2's: leave the three unrecommended.
Flag each for sign-off.
SEED carry_forward from the most recent monitoring memo if one exists (open requests, unresolved
flags, last headline); else leave empty. Thereafter monthly-monitor maintains it automatically.
4b. BUILD the EBITDA add-back register (ebitda_addbacks) — the analyst sets this ONCE, here.
Covenant EBITDA turns on which costs get added back, and that is a judgment no engine can make from
an account name. Sweep for candidates, then put them to the analyst as a menu, once:
accounting_basis's
reference financials (what the parties themselves treated as addable, on the document's face);
the IC/UW memo's adjusted-EBITDA analysis; the borrower's own compliance-certificate schedule if
it shows one; the pinned plan; and the borrower's chart of accounts for the names that carry
these costs — miscellaneous, restructuring, impairment, write-off, write-down, severance,
transaction costs, legal settlement, one-time, non-recurring.treatment (include / exclude / cap at $X / ask each month), one
line of reason, the source, and credit_view — discount where a line is permitted for the
covenant test but not believed for the credit read (a write-down that recurs annually is the
standard case). Blank is not a default: an unanswered candidate is asked, not assumed.discount line and is what leverage and
trend commentary read. Report both, labelled.
The register lives in deal-context, NOT in covenant-spec, on purpose: the spec records what the
agreement permits and is re-derived on every amendment; this records what the analyst elected and
survives one. On an amendment the elections carry forward and the analyst is told which ones the
new agreement no longer permits.Record provenance (auto-drafted vs analyst-signed, incl. static.business_profile as
auto-draftable) and stamp last_reviewed.
modules[] set; model.scale + model.currency read off the workbook
and checked against one figure with the analyst; line-read floor decided and stated to the analyst;
every path written as source: or store: and every A1 input as source:, with step 8's check
passing; the canonical model path is under the stable _model/
workspace rather than .record/current; borrower registered.ebitda_addbacks built with the analyst, every candidate given a treatment and a reason (blank is not a default); facility with per-figure sources; business_profile with per-field
sources and source_tier stamps (silent fields flagged drafts); credit_thesis + key_risks_at_uw
from the IC memo (or flagged absent), every pillar read back to the analyst in the memo's own
words before it was given a status; archetype proposed with its provenance; deal_team scored
against the book, confirmed by the analyst and stamped (empty is a valid answer); our_view
captured from the analyst against the period's
objective evidence; provenance and last_reviewed stamped.Running standalone, close with a menu: [Set up covenants next] (follow covenant-setup — the model and collateral map depend on it) / [Build the monitoring model] / [Run the monthly review] / [Done for now]. When another setup wrapper invoked you, skip this — it owns the sequence.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub 100xopensource/100x-credit-monitoring --plugin credit-monitoring10 skills in this plugin
/build-monitoring-modelBuild/refresh the canonical monthly financials model (Income Statement, Balance Sheet, Cash Flow) for a borrower from its reporting packages. Triggers: "build the monitoring model", "refresh the financials model", "append the new month", "rebuild after a restatement". Produces ONE validated workbook at the configured model_output_path. This is the data layer; downstream analysis reads it.
/covenant-setupOne-time per borrower: distill the credit agreement into a standardized, machine-readable covenant-spec.json — controlled-vocabulary covenants, shared definitions, thresholds/schedules, test dates, cure rights, and any covenant the borrower may satisfy one of two ways — plus the facility's contractual debt service (debt-service-spec.json: fundings, rate grids, PIK, amortization, day count, fees) and the generated per-month schedule covenant Fixed Charges read. Triggers: "set up covenants", "extract covenant spec", "parse the credit agreement covenants", "build the debt-service schedule". Run once; monthly compliance reads the spec, not the agreement. Needs the credit-agreement path (it lives outside the reporting folder).
/monthly-monitorRun the monthly portfolio monitor for a borrower. Loads borrower-config and deal-context, asks the analyst what to watch, ensures the financials model is current, establishes continuity with the prior period, fans out the enabled analysis modules in parallel, synthesizes the monitoring memo, and writes carry-forward state back. Triggers: "run the monthly monitor", "build the monitoring memo for {borrower}", "monthly portfolio review".
/open-folder-guideOpen the illustrated folder setup guide without starting monitoring or requesting folder access. Use when the user says “open the folder guide”, asks how local or synced folders work, or wants pictures for folder setup.
/portfolio-artifactCreate, reopen, or check the private portfolio dashboard built from selected monitoring results. Same-link updates are deferred. Triggers: "create my portfolio dashboard", "update the dashboard", "open the portfolio dashboard", "is it current", "show me how to share the dashboard".
/refresh-dashboardBuild or refresh the local portfolio pages from verified published monitoring runs. Use this after selecting a monitoring run, when the local dashboard shows an old month, or when asked to refresh its saved pages. Hosted create and update requests belong to portfolio-artifact.
Other plugins' skills for the same job