Is the following sentence a cause or an effect? "The skill of the craftsperson was no longer needed."
In addition to situational and contextual analysis, "The skill of the craftsperson was no longer needed" is linguistically analyzed as showing effect. There will always be some predisposing circumstance/action/condition that causes the thing in question (e.g., skill of the craftsperson) to be not needed/needed.
An alternate sentence that shows this, in abbreviated form, might be, "Since preceding factor X is true, then the skill was no longer needed/would be no longer needed/is needed." Or an alternate sentence might be, "The skill was no longer needed/would be no longer needed/is needed because of preceding factor X." Or it might be, "The skill was no longer needed/would be no longer needed/is needed, therefore secondary factor Q has or has not/may or may not occur. ... Oh, and the skill was/would be no longer needed/is needed because of preceding factor X."
In any syntactical construction, the skill being no longer needed/needed follows a cause and is therefore the effect even though it might also become the cause of a secondary or corollary effect branching out from the first effect, which is the skill not being/being needed. Does this make sense? In short: This sentence indicates an effect following a cause but it may also double as a secondary/corollary cause to a secondary/corollary effect.
In addition, the verb is constructed in the passive voice [be + past participle (was + negator + needed)]. Passive voice indicates that the sentence is the effect of some cause, though the instigator and causative action are not mentioned.
It all depends on the context. In general, since cause-and-effect is about the relationship between two events, it is difficult to look at a sentence in isolation and determine if it is describing a cause or an effect.
Imagine that your sentence were about a man who made buggy whips. Now, when cars were invented and became popular, very few people needed the skills of a master buggywhip craftsman. The cause would be the invention of cars; the effect would be:
The skill of the craftsperson was no longer needed.
However, the relationship would change if we began to discuss the craftsman's future. Imagine that our buggywhip maker lost his livelihood, took to drinking, and ended up homeless. Then your sentence (The skill of the craftsperson...) would be the cause, and his destitution would be the effect.
Your sentence is a 'passive voice' sentence. It can't be 'cause' as a passive voice sentence. Let's re-write it as an active sentence...
Nobody needed the skill of the craftsperson any longer.
Is this cause or effect? It is definitely not a cause. 'Any Longer' suggests they did need the skills in the past, but now they don't. So the craftperson's skills have been effected by some change.
It is effect.