> ## Documentation Index
> Fetch the complete documentation index at: https://docs.profy.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Expert Mode

> The real difference between 0 (compatibility) and 1 (full) — and why protection of internal content does not depend on this toggle

In Studio this toggle is labeled "Hide internal content". The name invites an assumption: that leaving it off exposes your persona, skills, and soul to buyers.

**It does not.** Redaction of sensitive content is unconditional and has nothing to do with this toggle. What the toggle actually controls today is something else entirely. This page separates the two.

<Note>
  Verified 2026-08-11. Sources listed at the bottom of this page.
</Note>

***

## The two values

| Value | Meaning (column comment)  |
| ----- | ------------------------- |
| `0`   | Legacy compatibility mode |
| `1`   | Full Expert mode          |

The database default is `0`.

***

## Redaction does not depend on this toggle

The public marketplace detail endpoint **does not SELECT these columns at all**:

* `personaMd`
* `guardContent`

Three more are present in the type but hardcoded to null in the response:

```ts theme={null}
// services/core/src/db/service/expert.ts — public detail response
skillContent: null,
soulContent: null,
agentContent: null,
```

There is no `if (expertMode)` anywhere in that code. Both content-read paths — live Experts and unpublished ones — behave identically.

Therefore: **buyers cannot see any of these five items, regardless of the toggle.** Protection is server-side behavior, not an option.

***

## What the toggle actually controls

Two behaviors depend on it today.

### 1. Whether the purchase dialog is mounted

In the marketplace action area, the purchase dialog component mounts only when `expertMode` is truthy:

```tsx theme={null}
{expertMode && (
  <ExpertPurchaseDialog ... />
)}
```

And the condition that opens it is:

```tsx theme={null}
if (!expertPurchased && price != null && price > 0 && !allowTrial) {
  setShowExpertPurchase(true);
}
```

Together: an Expert that is **paid, has trial disabled, and is not yet purchased** needs the purchase dialog when the user clicks "Use". If `expertMode` is 0 at that moment, the dialog is not mounted and the purchase flow has no path forward.

<Warning>
  If your Expert is paid **with trial disabled**, make sure `expertMode` is 1 — otherwise buyers may click through to no usable purchase entry.

  Paid Experts that **keep trial enabled** are unaffected: users enter the trial first and unlock through a different path once it is exhausted.
</Warning>

### 2. Derivation when importing an Expert package

When configuration is imported from an Expert archive, the value is derived from the package's visibility declaration:

```ts theme={null}
const allHidden =
  vis.persona === "hidden" && vis.skills === "hidden" && vis.knowledge === "hidden";
result.expertMode = allHidden ? 1 : 0;
```

All three must be `hidden` to yield 1; any one of them being otherwise yields 0.

***

## Publishing may override it

The publish flow enforces one rule: **an Expert carrying skill content gets `expertMode` forced to 1 at publish**, overriding your setting.

```ts theme={null}
// WHY: experts with skills auto-enable expertMode to protect creator IP
const hasSkills = !!row.skillContent?.trim();
const expertModeOverride = hasSkills ? { expertMode: 1 } : {};
```

The override happens inside the publish transaction, alongside the status update.

So:

* Your Expert has skills → the value is 1 after publishing, and turning it off in Studio will be reverted by the publish flow
* Your Expert has no skills → your setting is preserved

***

## How to set it

| Your Expert              | Recommendation | Why                                         |
| ------------------------ | -------------- | ------------------------------------------- |
| Has skills               | Ignore it      | Forced to 1 at publish                      |
| Paid with trial disabled | Set to 1       | Guarantees the purchase dialog is available |
| Free                     | No impact      | No purchase flow involved                   |
| Paid with trial enabled  | No impact      | Goes through the trial-then-unlock path     |

In short: leaving it at 1 is safe in nearly every case, and costs nothing — redaction is unconditional anyway, so enabling it hides nothing extra.

***

## Limits and failure modes

<AccordionGroup>
  <Accordion title="I turned it off and buyers still cannot see my persona">
    Correct behavior. Redaction is unconditional and independent of this toggle. To let buyers understand what your Expert can do, use the overview and case demos — those fields are meant for buyers.
  </Accordion>

  <Accordion title="I turned it off in Studio but it is back on after publishing">
    Your Expert carries skill content, so publishing forces it to 1 to protect creator IP. This is expected.
  </Accordion>

  <Accordion title="Buyers click 'Use' and nothing happens">
    If this is a paid Expert with trial disabled, check that `expertMode` is 1. At 0, the purchase dialog component is not mounted.
  </Accordion>

  <Accordion title="The value after importing a package is not what I expected">
    Import derives it from the package's `visibility` block, and requires persona, skills, and knowledge to **all** be `hidden` before setting 1. Check the visibility declaration in the package.
  </Accordion>
</AccordionGroup>

***

## Verify

Test from a **non-owner account** on the marketplace page:

1. **Redaction** — open the detail page and confirm your persona, soul, agent rules, and skill text do not appear anywhere. This should pass regardless of the toggle; if it does not, something else is wrong and is worth reporting.
2. **Purchase path** (paid Experts with trial disabled only) — click "Use" and confirm the purchase dialog appears and payment completes.

Item 2 cannot be tested from the owner account: you have full access to your own Expert and never hit the purchase branch.

***

## Sources

<Note>
  Verified 2026-08-11. Sources:

  * Value semantics and default: `packages/db/src/schema/marketplace.ts`
  * Unconditional redaction in public detail: `services/core/src/db/service/expert.ts` (neither content-read path in `getExpertDetail` selects the sensitive columns)
  * Automatic override at publish: same file (`expertModeOverride` in the publish transaction)
  * Purchase dialog gating and trigger condition: `apps/web/src/components/marketplace/UseInProfyAction.tsx`
  * Import derivation: `apps/web/src/lib/expert/parse-expert-zip.ts`
  * Toggle label: `apps/web/src/i18n/messages/{zh,en}/creatorCenter.json`
</Note>

***

## Next

<CardGroup cols={2}>
  <Card title="Prompt Layers" icon="layer-group" href="/en/creators/expert-config/prompt-layers">
    Where each of the four fields is injected
  </Card>

  <Card title="Pricing and Billing" icon="tag" href="/en/creators/pricing-and-billing">
    How price derives the billing type
  </Card>
</CardGroup>
