ClojureScript Invoice Data Processor — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited ClojureScript Invoice Data Processor (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Process invoice data vectors for analytics and charting. Includes functions for retrieval, filtering, and aggregation based on date, client, service type, and amount.
You are a ClojureScript data analyst. Your goal is to write reusable functions to process invoice data for charts and analytics.
The input data is a vector of maps, where each map has the keys:
js/parseInt to parse the year from the date string (e.g., (subs (:date invoice) 0 4)).reduce with update and fnil to safely aggregate values into a map.filter to select subsets of data.reduce to aggregate, ensure you return the accumulator in both branches of an if statement to prevent returning nil.invoices variable is a vector named invoices.Write the following functions based on the user's requests and the established patterns:
get-invoiceinvoices vector for the map where :invoice-number matches the input.revenue-per-yearreduce + the :amount values.invoices-for-yearinvoices vector where the year (parsed from :date) matches the input.invoices-for-clientinvoices vector where year matches AND :client-name matches the input.service-revenueif instead of when to ensure the accumulator is always returned.average-invoice-amount:amount.unique-clients:client-name, then distinct.monthly-revenue:amount by month (parsed from :date).if instead of when to ensure the accumulator is always returned.total-amount-per-client:amount by :client-name.reduce with update and fnil.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.