Claude skills that keep reports honest

You do NOT have access to the order table, refund records, launch
calendars, or SKU-level sales history. Do not attribute category-level
trends to store-wide causes. Report the pattern you observe; do not
explain why it exists unless the data itself makes it unambiguous.

That line goes at the top of every Claude skill I write for store reporting, and it’s the first thing I’d add to yours. I adapted it from one of the four lines Haden Pelletier recommends in her post on Towards Data Science. Her case is a quarterly customer sentiment report where Claude claimed a whole Dresses department had a sentiment problem, when the negative reviews came almost entirely from a single product launched mid-quarter with a known defect. Nothing was invented. The model had no context, so it filled the gap with the most plausible story, which is what these models do.

I’d use all four of her lines in any reporting skill. The split she doesn’t draw is the one I care about most. A Claude skill is instructions, and instructions can’t create evidence. On a WooCommerce store the counting belongs in PHP, before the model ever sees a review. The skill’s job is interpretation, and knowing where its limits are.

What the model was never told

Her original prompt is a decent brief: role, deliverable, tone. What’s missing is any statement of inputs. Claude was told to act like a data analyst, so it did, strategic narrative and all. Her four lines fix that. Name the context you don’t have, define significant with numbers (she used a shift of more than 15 percentage points, or a theme appearing in more than 20% of reviews, on her dataset), label every insight [Data-Supported], [Possible] or [Speculative], and end with a section called What This Report Cannot Tell You.

The common wrong fix is appending “be rigorous, avoid hallucinations, double-check everything” to the prompt. That gives the model nothing to check against, so the output changes tone and nothing else. The subtler wrong fix is in the source’s own first attempt: letting Claude generate and save the skill itself. A skill the model wrote is a summary of one run that looked fine. It records what you got away with, and the model can’t write down failures it never saw. Skills get good the way test suites do, from failures. Feeding failures back into the instructions is the part worth stealing, and it’s the loop I described when I wrote about making Claude Code improve itself overnight.

Claude skills can’t count

Her threshold line works when Claude can do the arithmetic on the text in front of it, and across the 23,000 reviews in her dataset that’s where models drift. I’d rather the numbers exist before interpretation starts, especially for the failure in her report, where one SKU dragged the whole category down. The check is small: negative reviews per product for the quarter.

global $wpdb;

$since = gmdate( 'Y-m-d H:i:s', strtotime( '-90 days' ) );

$rows = $wpdb->get_results(
    $wpdb->prepare(
        "SELECT p.ID, p.post_title,
                COUNT( c.comment_ID ) AS reviews,
                SUM( cm.meta_value <= 2 ) AS negative
         FROM {$wpdb->posts} p
         JOIN {$wpdb->comments} c
              ON c.comment_post_ID = p.ID
             AND c.comment_type = 'review'
             AND c.comment_approved = 1
             AND c.comment_date_gmt >= %s
         LEFT JOIN {$wpdb->commentmeta} cm
              ON cm.comment_id = c.comment_ID
             AND cm.meta_key = 'rating'
         WHERE p.post_type = 'product'
         GROUP BY p.ID, p.post_title
         ORDER BY negative DESC",
        $since
    )
);

// hand $rows to the skill next to the review text

WooCommerce stores the star rating in the commentmeta table under the key rating, so the join stays cheap. Give this result to the skill with the review text and two things change. [Data-Supported] has something to attach to, because “most negative reviews in Dresses point at one product” becomes a row the stakeholder can open. And significant stops being a vibe, because the counts sit right there next to whatever threshold the store owner cares about. Her 15 points and 20% were tuned to her data. On a client store the threshold is a conversation, which is one reason to keep it in a reference file beside the skill. If raw joins are new to you, the wpdb::get_results reference is the page to read first.

If you want this shape of reporting on a store, counts from the database and a model that only interprets, that’s the kind of work I do. Send me what you generate now and I’ll tell you which parts should move into code.

When the honesty lines backfire

The source warns that stacked constraints can push Claude into hedging every sentence, and offers a counterbalancing clause that tells it to state clear patterns plainly. Fair enough. Caution clauses pile up fast, and the report starts reading like a disclaimer. There’s a structural version of the problem too. Anthropic’s skill authoring guidance treats rules in a SKILL.md as requests that can be ignored, and says to keep the file under 500 lines with detail split into reference files. The source’s step 3 is to add a clause for each failure you find. Run that for a year of quarterlies and the skill is a changelog of the model’s mistakes, loaded into context each run, with nothing enforced. When something has to hold, code holds it, or a hook does, and I’ve written about which hook techniques are worth copying.

None of that argues against the four lines. They’re cheap and they fix tone, which is most of what a stakeholder notices. They just don’t fix arithmetic, and a report that’s wrong about the numbers while sounding sure is the more dangerous kind.

The question I haven’t settled is where interpretation should live. The lines change how Claude talks about evidence, while a query changes what the evidence is. Every threshold I move into SQL is one fewer claim a store owner takes on faith, but keep pulling things out of the skill and it shrinks toward a thin wrapper around a report I could write myself. I don’t know where the useful middle is. It matters, because a client reading a polished PDF can’t tell which parts were counted and which were guessed.

author avatar
Ahmad Wael
I'm a WordPress and WooCommerce developer with 15+ years of experience building custom e-commerce solutions and plugins. I specialize in PHP development, following WordPress coding standards to deliver clean, maintainable code. Currently, I'm exploring AI and e-commerce by building multi-agent systems and SaaS products that integrate technologies like Google Gemini API with WordPress platforms, approaching every project with a commitment to performance, security, and exceptional user experience.

Leave a Comment