Enterprise Invoice Collection and Download
Paste the following prompt into your AI chat to install this skill:
Please install @user_bbae3f97/qixaingyun-tax-collection-skill following the guide at https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Finance and Agent workflows often need to query input/output invoice data, but real calls depend on tax bureau or Qixiangyun sessions, enterprise account identity, nsrsbh, accountId, and short-lived Agent Grant values. Hand-rolled HTTP, saved browser state, or asking users to relay internal identifiers can cause cross-tenant session mixing, credential leakage, and concurrency bugs.
How the skill works
The skill routes four invoice tools through scripts/invoice_collection_workflow.py collect: query_input_output_invoice_info_auto, query_invoice_basic_info_auto, query_invoice_detail_aggregation_auto, and query_taxable_voucher_input_tax_transfer_out_auto. The first call creates a one-time login session instead of calling the invoice MCP directly. The Agent exposes only login_url to the user, runs internal waitArgv, waits for qxy.agent_login.completed, then restores nsrsbh, accountId, and a valid grant from the private flow before adding X-QXY-Agent-Grant and resuming. Multi-tenant agents should pass a stable private --login-context-id; --switch-account invalidates the old grant before a new login link is returned.
Boundaries and notes
- Use a complete
QXY_API_KEY; do not concatenate values across environment variables or.envfiles, and never print it. - Do not bypass the workflow with
curl, manual HTTP, browser automation, or user-provided grants;mcp_client.pyis mainly for service and schema inspection. - Login links default to 1 hour and grants to 24 hours, but tax bureau sessions may expire earlier.
- A
code=505069authorization-expiry response is a non-retryable failed terminal state; do not re-login, retry, or store it as a successful call.
Use Cases
- A finance Agent needs to query input/output invoices for an enterprise account and produce a checkable result.
- When paginating basic invoice info, the skill resumes the flow and calls the basic-info tool.
- When checking one invoice detail aggregation where detail and transfer tools also bind aggOrgId.
- When verifying input-tax transfers for taxable vouchers, it calls the tool with a valid grant.
Best For
- Backend engineers integrating invoice queries into finance Agents
- Business developers debugging enterprise invoice aggregation pipelines
- Architects isolating enterprise sessions in multi-tenant Agent platforms
- Finance-system developers avoiding manual login state and grant handling
Related Skills
Guides household property decisions by analyzing budget, debt, building age, and market conditions, then produces structured buying advice and a report.
Routes business questions to 35 management consulting tools, runs methods such as SWOT, Porter's Five Forces, BCG, and KPI/BSC, and returns conclusions, evidence, actions, and confidence.
Guides non-experts through conversational product discovery to clarify ideas, costs, boundaries, and risks into a structured PRD.
Search Taobao for high-value products by budget, type, or brand, find hidden coupons, and generate a Taobao purchase link after confirmation.